├── cef3 ├── include │ ├── cef_pack_resources.h │ ├── cef_pack_strings.h │ └── internal │ │ └── cef_export.h └── libcef_dll │ ├── wrapper │ ├── libcef_dll_wrapper2.cc │ ├── cef_closure_task.cc │ └── cef_byte_read_handler.cc │ ├── base │ ├── cef_bind_helpers.cc │ ├── cef_thread_checker_impl.cc │ ├── cef_callback_internal.cc │ ├── cef_callback_helpers.cc │ ├── cef_ref_counted.cc │ ├── cef_lock.cc │ └── cef_weak_ptr.cc │ ├── ctocpp │ ├── print_job_callback_ctocpp.cc │ ├── download_item_callback_ctocpp.cc │ ├── geolocation_callback_ctocpp.cc │ ├── allow_certificate_error_callback_ctocpp.cc │ ├── jsdialog_callback_ctocpp.cc │ ├── callback_ctocpp.cc │ ├── before_download_callback_ctocpp.cc │ ├── quota_callback_ctocpp.cc │ ├── callback_ctocpp.h │ ├── scheme_registrar_ctocpp.cc │ ├── print_job_callback_ctocpp.h │ ├── quota_callback_ctocpp.h │ ├── print_dialog_callback_ctocpp.cc │ ├── v8stack_trace_ctocpp.h │ ├── auth_callback_ctocpp.h │ ├── jsdialog_callback_ctocpp.h │ ├── geolocation_callback_ctocpp.h │ ├── download_item_callback_ctocpp.h │ ├── scheme_registrar_ctocpp.h │ ├── auth_callback_ctocpp.cc │ ├── web_plugin_info_ctocpp.h │ ├── print_dialog_callback_ctocpp.h │ ├── request_context_ctocpp.h │ ├── file_dialog_callback_ctocpp.h │ ├── stream_reader_ctocpp.h │ ├── stream_writer_ctocpp.h │ ├── before_download_callback_ctocpp.h │ ├── binary_value_ctocpp.h │ ├── urlrequest_ctocpp.h │ ├── post_data_ctocpp.h │ ├── task_runner_ctocpp.h │ ├── process_message_ctocpp.h │ ├── v8exception_ctocpp.h │ ├── allow_certificate_error_callback_ctocpp.h │ ├── v8stack_frame_ctocpp.h │ ├── file_dialog_callback_ctocpp.cc │ ├── post_data_element_ctocpp.h │ ├── v8context_ctocpp.h │ ├── response_ctocpp.h │ ├── zip_reader_ctocpp.h │ ├── cookie_manager_ctocpp.h │ └── download_item_ctocpp.h │ ├── cpptoc │ ├── app_cpptoc.h │ ├── task_cpptoc.h │ ├── task_cpptoc.cc │ ├── client_cpptoc.h │ ├── v8handler_cpptoc.h │ ├── v8accessor_cpptoc.h │ ├── domvisitor_cpptoc.h │ ├── read_handler_cpptoc.h │ ├── write_handler_cpptoc.h │ ├── drag_handler_cpptoc.h │ ├── load_handler_cpptoc.h │ ├── cookie_visitor_cpptoc.h │ ├── focus_handler_cpptoc.h │ ├── print_handler_cpptoc.h │ ├── dialog_handler_cpptoc.h │ ├── render_handler_cpptoc.h │ ├── string_visitor_cpptoc.h │ ├── display_handler_cpptoc.h │ ├── request_handler_cpptoc.h │ ├── download_handler_cpptoc.h │ ├── jsdialog_handler_cpptoc.h │ ├── keyboard_handler_cpptoc.h │ ├── resource_handler_cpptoc.h │ ├── urlrequest_client_cpptoc.h │ ├── completion_callback_cpptoc.h │ ├── end_tracing_callback_cpptoc.h │ ├── scheme_handler_factory_cpptoc.h │ ├── geolocation_handler_cpptoc.h │ ├── context_menu_handler_cpptoc.h │ ├── web_plugin_info_visitor_cpptoc.h │ ├── get_geolocation_callback_cpptoc.h │ ├── render_process_handler_cpptoc.h │ ├── browser_process_handler_cpptoc.h │ ├── request_context_handler_cpptoc.h │ ├── resource_bundle_handler_cpptoc.h │ ├── life_span_handler_cpptoc.h │ ├── string_visitor_cpptoc.cc │ ├── web_plugin_unstable_callback_cpptoc.h │ ├── completion_callback_cpptoc.cc │ ├── run_file_dialog_callback_cpptoc.h │ ├── domvisitor_cpptoc.cc │ ├── end_tracing_callback_cpptoc.cc │ ├── request_context_handler_cpptoc.cc │ ├── web_plugin_unstable_callback_cpptoc.cc │ ├── web_plugin_info_visitor_cpptoc.cc │ ├── get_geolocation_callback_cpptoc.cc │ ├── drag_handler_cpptoc.cc │ ├── run_file_dialog_callback_cpptoc.cc │ └── cookie_visitor_cpptoc.cc │ └── transfer_util.h ├── MiniServo ├── en.lproj │ ├── InfoPlist.strings │ └── Credits.rtf ├── failure.html ├── Images.xcassets │ ├── BackIcon.imageset │ │ ├── back.png │ │ ├── back2x.png │ │ └── Contents.json │ ├── ReloadIcon.imageset │ │ ├── reload.png │ │ ├── reload@2x.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Minefield-1.png │ │ ├── Minefield-2.png │ │ ├── Minefield-3.png │ │ ├── Minefield-4.png │ │ ├── Minefield-5.png │ │ ├── Minefield.png │ │ └── Contents.json │ ├── ForwardIcon.imageset │ │ ├── forward.png │ │ ├── forward2x.png │ │ └── Contents.json │ ├── SearchIcon.imageset │ │ ├── search1x.png │ │ ├── search2x.png │ │ └── Contents.json │ ├── BookmarkIcon.imageset │ │ ├── bookmark1x.png │ │ ├── bookmark2x.png │ │ └── Contents.json │ ├── ReloadLitIcon.imageset │ │ ├── reload-lit.png │ │ ├── reload-lit@2x.png │ │ └── Contents.json │ ├── BookmarkMenuIcon.imageset │ │ ├── bookmarkmenu1x.png │ │ ├── bookmarkmenu2x.png │ │ └── Contents.json │ ├── DefaultFavIcon.imageset │ │ ├── defaultFavicon.png │ │ ├── defaultFavicon@2x.png │ │ └── Contents.json │ ├── BookmarkExistsIcon.imageset │ │ ├── bookmark-filled.png │ │ ├── bookmark-filled@2x.png │ │ └── Contents.json │ └── GenericIdentityIcon.imageset │ │ ├── single-identity-icon-generic.png │ │ ├── single-identity-icon-generic@2x.png │ │ └── Contents.json ├── MiniServo-Prefix.pch ├── MSURLView.h ├── MSURLField.h ├── MSSplendidBarView.h ├── main.m ├── MSBookmark.m ├── MSSearchResultCell.h ├── MSHistoryEntry.m ├── MSStatusBarCell.h ├── MSBookmarksListView.h ├── MSSplendidBarResultView.h ├── MSBookmarkOrHistoryEntry.h ├── MSTabStyle.h ├── MSBookmark.h ├── MSHistoryEntry.h ├── MSTabModel.h ├── MSTabModel.m ├── MSBookmarksListView.mm ├── MSWebView.h ├── quirks-mode.css ├── MSURLField.m ├── iso-8859-8.css ├── MSSplendidBarResultView.m ├── ServoLibrarySelectionHelp.rtf ├── MSSplendidBarView.m ├── servo.css ├── BookmarksHistoryModel.xcdatamodeld │ └── BookmarksHistoryModel.xcdatamodel │ │ └── contents ├── MiniServo-Info.plist ├── MSStatusBarCell.m ├── MSTabStyle.m └── MSCEFClient.h ├── MiniServoTests ├── en.lproj │ └── InfoPlist.strings ├── MiniServoTests-Info.plist └── MiniServoTests.m ├── COPYING.md ├── .gitmodules ├── MiniServo.xcodeproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── NSString+MSStringAdditions.h ├── NSString+MSStringAdditions.mm └── README.md /cef3/include/cef_pack_resources.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cef3/include/cef_pack_strings.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MiniServo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /MiniServoTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /MiniServo/failure.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | about:failure 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BackIcon.imageset/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BackIcon.imageset/back.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BackIcon.imageset/back2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BackIcon.imageset/back2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadIcon.imageset/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ReloadIcon.imageset/reload.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-1.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-2.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-3.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-4.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield-5.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Minefield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/AppIcon.appiconset/Minefield.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ForwardIcon.imageset/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ForwardIcon.imageset/forward.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ForwardIcon.imageset/forward2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ForwardIcon.imageset/forward2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadIcon.imageset/reload@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ReloadIcon.imageset/reload@2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/SearchIcon.imageset/search1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/SearchIcon.imageset/search1x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/SearchIcon.imageset/search2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/SearchIcon.imageset/search2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkIcon.imageset/bookmark1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkIcon.imageset/bookmark1x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkIcon.imageset/bookmark2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkIcon.imageset/bookmark2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadLitIcon.imageset/reload-lit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ReloadLitIcon.imageset/reload-lit.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadLitIcon.imageset/reload-lit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/ReloadLitIcon.imageset/reload-lit@2x.png -------------------------------------------------------------------------------- /COPYING.md: -------------------------------------------------------------------------------- 1 | MiniServo is licensed under the same terms as Servo itself, with the exception of the art assets from Firefox (mozilla-central), which are licensed under the same terms as Firefox itself. -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkMenuIcon.imageset/bookmarkmenu1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkMenuIcon.imageset/bookmarkmenu1x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkMenuIcon.imageset/bookmarkmenu2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkMenuIcon.imageset/bookmarkmenu2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/DefaultFavIcon.imageset/defaultFavicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/DefaultFavIcon.imageset/defaultFavicon.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/DefaultFavIcon.imageset/defaultFavicon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/DefaultFavIcon.imageset/defaultFavicon@2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkExistsIcon.imageset/bookmark-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkExistsIcon.imageset/bookmark-filled.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkExistsIcon.imageset/bookmark-filled@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/BookmarkExistsIcon.imageset/bookmark-filled@2x.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/GenericIdentityIcon.imageset/single-identity-icon-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/GenericIdentityIcon.imageset/single-identity-icon-generic.png -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/GenericIdentityIcon.imageset/single-identity-icon-generic@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pcwalton/miniservo-mac/HEAD/MiniServo/Images.xcassets/GenericIdentityIcon.imageset/single-identity-icon-generic@2x.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "MMTabBarView"] 2 | path = MMTabBarView 3 | url = https://github.com/MiMo42/MMTabBarView.git 4 | [submodule "INAppStoreWindow"] 5 | path = INAppStoreWindow 6 | url = https://github.com/indragiek/INAppStoreWindow.git 7 | -------------------------------------------------------------------------------- /MiniServo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MiniServo/MiniServo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /cef3/libcef_dll/wrapper/libcef_dll_wrapper2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | -------------------------------------------------------------------------------- /MiniServo/MSURLView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSURLView.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/21/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSURLView : NSView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MiniServo/MSURLField.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSURLField.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSURLField : NSTextField 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MiniServo/MSSplendidBarView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSSplendidBarView.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSSplendidBarView : NSView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /MiniServo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/6/14. 6 | // Copyright (c) 2014 Patrick Walton. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) 12 | { 13 | return NSApplicationMain(argc, argv); 14 | } 15 | -------------------------------------------------------------------------------- /MiniServo/MSBookmark.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSBookmark.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSBookmark.h" 10 | 11 | 12 | @implementation MSBookmark 13 | 14 | @dynamic url; 15 | @dynamic title; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /MiniServo/MSSearchResultCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSSearchResultCell.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSSearchResultCell : NSTextAttachmentCell 12 | 13 | @property (strong) NSString *text; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /MiniServo/MSHistoryEntry.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSHistoryEntry.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSHistoryEntry.h" 10 | 11 | 12 | @implementation MSHistoryEntry 13 | 14 | @synthesize date; 15 | 16 | @dynamic url; 17 | @dynamic title; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /MiniServo/MSStatusBarCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSStatusBarCell.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/26/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSStatusBarCell : NSTextFieldCell 12 | 13 | -(void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /MiniServo/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \vieww9600\viewh8400\viewkind0 5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 6 | 7 | \f0\b\fs24 \cf0 With special thanks to: 8 | \b0 \ 9 | The Mozilla and Rust communities\ 10 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BackIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "back.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "back2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ForwardIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "forward.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "forward2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "reload.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "reload@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/SearchIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "search1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "search2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "bookmark1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "bookmark2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_bind_helpers.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_bind_helpers.h" 6 | 7 | #include "include/base/cef_callback.h" 8 | 9 | namespace base { 10 | 11 | void DoNothing() { 12 | } 13 | 14 | } // namespace base 15 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/ReloadLitIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "reload-lit.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "reload-lit@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/MSBookmarksListView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSBookmarksListView.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MSAppDelegate.h" 11 | 12 | @interface MSBookmarksListView : NSTableView 13 | 14 | @property (assign) IBOutlet MSAppDelegate *appDelegate; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkMenuIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "bookmarkmenu1x.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "bookmarkmenu2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/DefaultFavIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "defaultFavicon.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "defaultFavicon@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /NSString+MSStringAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSStringAdditions.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #include 11 | 12 | @interface NSString (MSStringAdditions) 13 | 14 | + (NSString *)stringWithCEFString: (CefString)cefString; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/BookmarkExistsIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "bookmark-filled.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "bookmark-filled@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/MSSplendidBarResultView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSSplendidBarResultView.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MSSplendidBarResultView : NSTextView 12 | 13 | @property (strong) id splendidBarResultDelegate; 14 | @property (strong) NSObject *representedObject; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MiniServo/MSBookmarkOrHistoryEntry.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSBookmarkOrHistoryEntry.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol MSBookmarkOrHistoryEntry 12 | 13 | @property (nonatomic, retain) NSString * url; 14 | @property (nonatomic, retain) NSString * title; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MiniServo/MSTabStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSTabStyle.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/25/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MSTabStyle : MMSafariTabStyle 13 | 14 | - (NSAttributedString *)attributedStringValueForTabCell:(MMTabBarButtonCell *)cell; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/GenericIdentityIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "single-identity-icon-generic.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "single-identity-icon-generic@2x.png" 12 | } 13 | ], 14 | "info" : { 15 | "version" : 1, 16 | "author" : "xcode" 17 | } 18 | } -------------------------------------------------------------------------------- /MiniServo/MSBookmark.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSBookmark.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "MSBookmarkOrHistoryEntry.h" 12 | 13 | @interface MSBookmark : NSManagedObject 14 | 15 | @property (nonatomic, retain) NSString * url; 16 | @property (nonatomic, retain) NSString * title; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /MiniServo/MSHistoryEntry.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSHistoryEntry.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "MSBookmarkOrHistoryEntry.h" 12 | 13 | @interface MSHistoryEntry : NSManagedObject 14 | 15 | @property (nonatomic, retain) NSString * url; 16 | @property (nonatomic, retain) NSString * title; 17 | @property (nonatomic, retain) NSDate * date; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /NSString+MSStringAdditions.mm: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MSStringAdditions.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "NSString+MSStringAdditions.h" 10 | #include 11 | 12 | @implementation NSString (MSStringAdditions) 13 | 14 | + (NSString *)stringWithCEFString: (CefString)cefString { 15 | return [[NSString alloc] initWithBytes:cefString.c_str() 16 | length:cefString.length() * 2 17 | encoding:NSUTF16LittleEndianStringEncoding]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /MiniServo/MSTabModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSTabModel.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/25/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class MSHistoryEntry; 13 | 14 | @interface MSTabModel : NSObject { 15 | BOOL mIsProcessing; 16 | NSString *mTitle; 17 | MSHistoryEntry *mHistoryEntry; 18 | } 19 | 20 | @property (assign) BOOL isProcessing; 21 | @property (strong) NSImage *icon; 22 | @property (copy) NSString *title; 23 | @property (strong) MSHistoryEntry *historyEntry; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /MiniServo/MSTabModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSTabModel.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/25/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSTabModel.h" 10 | #import "MSHistoryEntry.h" 11 | 12 | @implementation MSTabModel 13 | 14 | @synthesize isProcessing = mIsProcessing; 15 | @synthesize title = mTitle; 16 | @synthesize historyEntry = mHistoryEntry; 17 | 18 | - (id)init { 19 | self = [super init]; 20 | mIsProcessing = NO; 21 | mTitle = nil; 22 | mHistoryEntry = nil; 23 | return self; 24 | } 25 | 26 | @dynamic icon; 27 | 28 | - (NSImage *)icon { 29 | return nil; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /MiniServo/MSBookmarksListView.mm: -------------------------------------------------------------------------------- 1 | // 2 | // MSBookmarksListView.mm 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSBookmarksListView.h" 10 | 11 | @implementation MSBookmarksListView 12 | 13 | - (void)mouseDown:(NSEvent *)theEvent { 14 | NSInteger clickedRow = [self rowAtPoint:[self convertPoint:[theEvent locationInWindow] 15 | fromView:nil]]; 16 | 17 | [super mouseDown:theEvent]; 18 | 19 | if (clickedRow >= 0) 20 | [self.appDelegate navigateToBookmarkAtIndex:clickedRow]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /MiniServo/MSWebView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSWebView.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/6/14. 6 | // Copyright (c) 2014 Mozilla Foundation. All rights reserved. 7 | // 8 | 9 | #import 10 | #include 11 | #include 12 | #import "MSAppDelegate.h" 13 | 14 | class MSCEFClient; 15 | 16 | @interface MSWebView : NSView { 17 | MSAppDelegate* appDelegate; 18 | NSOpenGLContext *glContext; 19 | } 20 | 21 | -(id)initWithFrame:(NSRect)frame; 22 | -(void)initializeCompositing; 23 | -(void)setAppDelegate:(MSAppDelegate*)newDelegate; 24 | -(void)paint:(const void*)buffer withSize:(NSSize)size; 25 | -(void)present; 26 | -(void)updateGLContext; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /MiniServo/quirks-mode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 4 | 5 | > In quirks mode, the following rules are also expected to apply: 6 | 7 | */ 8 | 9 | @namespace url(http://www.w3.org/1999/xhtml); 10 | 11 | 12 | form { margin-bottom: 1em; } 13 | 14 | 15 | table { 16 | font-weight: initial; 17 | font-style: initial; 18 | font-variant: initial; 19 | font-size: initial; 20 | line-height: initial; 21 | white-space: initial; 22 | text-align: initial; 23 | } 24 | 25 | 26 | /* FIXME: https://html.spec.whatwg.org/multipage/rendering.html#margin-collapsing-quirks */ 27 | 28 | 29 | input:not([type=image]), textarea { box-sizing: border-box; } 30 | 31 | 32 | img[align=left i] { margin-right: 3px; } 33 | img[align=right i] { margin-left: 3px; } 34 | -------------------------------------------------------------------------------- /MiniServoTests/MiniServoTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.mozilla.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MiniServoTests/MiniServoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MiniServoTests.m 3 | // MiniServoTests 4 | // 5 | // Created by Patrick Walton on 11/6/14. 6 | // Copyright (c) 2014 Patrick Walton. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MiniServoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MiniServoTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /MiniServo/MSURLField.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSURLField.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSURLField.h" 10 | 11 | @implementation MSURLField 12 | 13 | - (id)initWithFrame:(NSRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code here. 18 | } 19 | return self; 20 | } 21 | 22 | - (void)drawRect:(NSRect)dirtyRect 23 | { 24 | [super drawRect:dirtyRect]; 25 | 26 | // Drawing code here. 27 | } 28 | 29 | - (void)mouseDown:(NSEvent *)theEvent { 30 | [super mouseDown:theEvent]; 31 | if ([self currentEditor] == nil || [[self currentEditor] selectedRange].length == 0) { 32 | [self selectText:self]; 33 | } 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /MiniServo/iso-8859-8.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering 4 | 5 | > When the document's character encoding is ISO-8859-8, 6 | > the following rules are additionally expected to apply, following [user-agent.css] 7 | 8 | */ 9 | 10 | @namespace url(http://www.w3.org/1999/xhtml); 11 | 12 | 13 | address, blockquote, center, div, figure, figcaption, footer, form, header, hr, 14 | legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, 15 | h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead, 16 | tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, [dir=ltr i], 17 | [dir=rtl i], [dir=auto i], *|* { 18 | unicode-bidi: bidi-override; 19 | } 20 | input:not([type=submit i]):not([type=reset i]):not([type=button i]), 21 | textarea, keygen { 22 | unicode-bidi: normal; 23 | } 24 | -------------------------------------------------------------------------------- /MiniServo/MSSplendidBarResultView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSSplendidBarResultView.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/30/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSSplendidBarResultView.h" 10 | 11 | @implementation MSSplendidBarResultView 12 | 13 | - (id)initWithFrame:(NSRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code here. 18 | } 19 | return self; 20 | } 21 | 22 | - (void)mouseDown:(NSEvent *)theEvent { 23 | if (self.splendidBarResultDelegate != nil && 24 | [self.splendidBarResultDelegate respondsToSelector: 25 | @selector(splendidBarResultViewReceivedClick:)]) { 26 | [self.splendidBarResultDelegate 27 | performSelector:@selector(splendidBarResultViewReceivedClick:) 28 | withObject:self]; 29 | } 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /MiniServo/ServoLibrarySelectionHelp.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf400 2 | {\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fnil\fcharset0 Monaco;} 3 | {\colortbl;\red255\green255\blue255;\red108\green108\blue108;} 4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural 6 | 7 | \f0\fs22 \cf2 \ 8 | Select the location of the Servo CEF library. Typically, this has a name such as 9 | \f1 libembedding-e53e83ea1c6515b7.dylib 10 | \f0 and can be found in the 11 | \f1 ports/cef/target/ 12 | \f0 (for a debug build) or 13 | \f1 ports/cef/target/release/ 14 | \f0 (for a release build) underneath your Servo checkout.\ 15 | \ 16 | If you don't have a Servo checkout yet or need help building the CEF port of Servo, visit\cf0 {\field{\*\fldinst{HYPERLINK "http://github.com/servo/servo"}}{\fldrslt http://github.com/servo/servo}}.\ 17 | } -------------------------------------------------------------------------------- /MiniServo/MSSplendidBarView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSSplendidBarView.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/29/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSSplendidBarView.h" 10 | 11 | @implementation MSSplendidBarView 12 | 13 | - (id)initWithFrame:(NSRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code here. 18 | } 19 | return self; 20 | } 21 | 22 | - (void)drawRect:(NSRect)dirtyRect 23 | { 24 | [super drawRect:dirtyRect]; 25 | 26 | [NSGraphicsContext saveGraphicsState]; 27 | [[NSColor colorWithCalibratedRed:255.0/255.0 28 | green:255.0/255.0 29 | blue:255.0/255.0 30 | alpha:0.97] set]; 31 | [[NSBezierPath bezierPathWithRoundedRect:[self frame] xRadius:6.0 yRadius:6.0] fill]; 32 | [NSGraphicsContext restoreGraphicsState]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_thread_checker_impl.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/internal/cef_thread_checker_impl.h" 6 | 7 | namespace base { 8 | 9 | ThreadCheckerImpl::ThreadCheckerImpl() 10 | : valid_thread_id_() { 11 | EnsureThreadIdAssigned(); 12 | } 13 | 14 | ThreadCheckerImpl::~ThreadCheckerImpl() {} 15 | 16 | bool ThreadCheckerImpl::CalledOnValidThread() const { 17 | EnsureThreadIdAssigned(); 18 | AutoLock auto_lock(lock_); 19 | return valid_thread_id_ == PlatformThread::CurrentRef(); 20 | } 21 | 22 | void ThreadCheckerImpl::DetachFromThread() { 23 | AutoLock auto_lock(lock_); 24 | valid_thread_id_ = PlatformThreadRef(); 25 | } 26 | 27 | void ThreadCheckerImpl::EnsureThreadIdAssigned() const { 28 | AutoLock auto_lock(lock_); 29 | if (valid_thread_id_.is_null()) { 30 | valid_thread_id_ = PlatformThread::CurrentRef(); 31 | } 32 | } 33 | 34 | } // namespace base 35 | -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_callback_internal.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/internal/cef_callback_internal.h" 6 | 7 | #include "include/base/cef_logging.h" 8 | 9 | namespace base { 10 | namespace internal { 11 | 12 | void CallbackBase::Reset() { 13 | polymorphic_invoke_ = NULL; 14 | // NULL the bind_state_ last, since it may be holding the last ref to whatever 15 | // object owns us, and we may be deleted after that. 16 | bind_state_ = NULL; 17 | } 18 | 19 | bool CallbackBase::Equals(const CallbackBase& other) const { 20 | return bind_state_.get() == other.bind_state_.get() && 21 | polymorphic_invoke_ == other.polymorphic_invoke_; 22 | } 23 | 24 | CallbackBase::CallbackBase(BindStateBase* bind_state) 25 | : bind_state_(bind_state), 26 | polymorphic_invoke_(NULL) { 27 | DCHECK(!bind_state_.get() || bind_state_->HasOneRef()); 28 | } 29 | 30 | CallbackBase::~CallbackBase() { 31 | } 32 | 33 | } // namespace internal 34 | } // namespace base 35 | -------------------------------------------------------------------------------- /MiniServo/servo.css: -------------------------------------------------------------------------------- 1 | input, select { display: inline-block; } 2 | input { background: white; min-height: 1.0em; padding: 0em; padding-left: 0.25em; padding-right: 0.25em; border: solid lightgrey 1px; color: black; white-space: nowrap; } 3 | input[type="button"], 4 | input[type="submit"], 5 | input[type="reset"] { background: lightgrey; border-top: solid 1px #EEEEEE; border-left: solid 1px #CCCCCC; border-right: solid 1px #999999; border-bottom: solid 1px #999999; text-align: center; vertical-align: middle; color: black; width: 100%; } 6 | input[type="hidden"] { display: none !important } 7 | input[type="checkbox"], 8 | input[type="radio"] { font-family: monospace !important; border: none !important; background: transparent; } 9 | 10 | input[type="checkbox"]::before { content: "[ ]"; padding: 0; } 11 | input[type="checkbox"][checked]::before { content: "[✓]"; } 12 | input[type="radio"]::before { content: "( )"; padding: 0; } 13 | input[type="radio"][checked]::before { content: "(●)"; } 14 | 15 | td[align="left"] { text-align: left; } 16 | td[align="center"] { text-align: center; } 17 | td[align="right"] { text-align: right; } 18 | -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_callback_helpers.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_callback_helpers.h" 6 | 7 | #include "include/base/cef_callback.h" 8 | 9 | namespace base { 10 | 11 | ScopedClosureRunner::ScopedClosureRunner() { 12 | } 13 | 14 | ScopedClosureRunner::ScopedClosureRunner(const Closure& closure) 15 | : closure_(closure) { 16 | } 17 | 18 | ScopedClosureRunner::~ScopedClosureRunner() { 19 | if (!closure_.is_null()) 20 | closure_.Run(); 21 | } 22 | 23 | void ScopedClosureRunner::Reset() { 24 | Closure old_closure = Release(); 25 | if (!old_closure.is_null()) 26 | old_closure.Run(); 27 | } 28 | 29 | void ScopedClosureRunner::Reset(const Closure& closure) { 30 | Closure old_closure = Release(); 31 | closure_ = closure; 32 | if (!old_closure.is_null()) 33 | old_closure.Run(); 34 | } 35 | 36 | Closure ScopedClosureRunner::Release() { 37 | Closure result = closure_; 38 | closure_.Reset(); 39 | return result; 40 | } 41 | 42 | } // namespace base 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/print_job_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefPrintJobCallbackCToCpp::Continue() { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_); 26 | } 27 | 28 | 29 | #ifndef NDEBUG 30 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/download_item_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefDownloadItemCallbackCToCpp::Cancel() { 19 | if (CEF_MEMBER_MISSING(struct_, cancel)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cancel(struct_); 26 | } 27 | 28 | 29 | #ifndef NDEBUG 30 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/geolocation_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/geolocation_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefGeolocationCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | 30 | #ifndef NDEBUG 31 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /MiniServo/BookmarksHistoryModel.xcdatamodeld/BookmarksHistoryModel.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefAllowCertificateErrorCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | 30 | #ifndef NDEBUG 31 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefJSDialogCallbackCToCpp::Continue(bool success, 19 | const CefString& user_input) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Unverified params: user_input 26 | 27 | // Execute 28 | struct_->cont(struct_, 29 | success, 30 | user_input.GetStruct()); 31 | } 32 | 33 | 34 | #ifndef NDEBUG 35 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /cef3/libcef_dll/wrapper/cef_closure_task.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #include "include/wrapper/cef_closure_task.h" 6 | #include "include/base/cef_callback.h" 7 | 8 | namespace { 9 | 10 | class CefClosureTask : public CefTask { 11 | public: 12 | explicit CefClosureTask(const base::Closure& closure) 13 | : closure_(closure) { 14 | } 15 | 16 | // CefTask method 17 | virtual void Execute() OVERRIDE { 18 | closure_.Run(); 19 | closure_.Reset(); 20 | } 21 | 22 | private: 23 | base::Closure closure_; 24 | 25 | IMPLEMENT_REFCOUNTING(CefClosureTask); 26 | DISALLOW_COPY_AND_ASSIGN(CefClosureTask); 27 | }; 28 | 29 | } // namespace 30 | 31 | CefRefPtr CefCreateClosureTask(const base::Closure& closure) { 32 | return new CefClosureTask(closure); 33 | } 34 | 35 | bool CefPostTask(CefThreadId threadId, const base::Closure& closure) { 36 | return CefPostTask(threadId, new CefClosureTask(closure)); 37 | } 38 | 39 | bool CefPostDelayedTask(CefThreadId threadId, const base::Closure& closure, 40 | int64 delay_ms) { 41 | return CefPostDelayedTask(threadId, new CefClosureTask(closure), delay_ms); 42 | } 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/app_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_app.h" 22 | #include "include/capi/cef_app_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAppCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefAppCppToC(CefApp* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/task_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_task.h" 22 | #include "include/capi/cef_task_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefTaskCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefTaskCppToC(CefTask* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/task_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/task_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK task_execute(struct _cef_task_t* self) { 19 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 20 | 21 | DCHECK(self); 22 | if (!self) 23 | return; 24 | 25 | // Execute 26 | CefTaskCppToC::Get(self)->Execute(); 27 | } 28 | 29 | 30 | // CONSTRUCTOR - Do not edit by hand. 31 | 32 | CefTaskCppToC::CefTaskCppToC(CefTask* cls) 33 | : CefCppToC(cls) { 34 | struct_.struct_.execute = task_execute; 35 | } 36 | 37 | #ifndef NDEBUG 38 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /MiniServo/MiniServo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.mozilla.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSApplicationCategoryType 26 | public.app-category.productivity 27 | LSMinimumSystemVersion 28 | ${MACOSX_DEPLOYMENT_TARGET} 29 | NSHumanReadableCopyright 30 | Copyright © 2014 Patrick Walton. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_client.h" 22 | #include "include/capi/cef_client_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefClientCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefClientCppToC(CefClient* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefCallbackCToCpp::Continue() { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_); 26 | } 27 | 28 | void CefCallbackCToCpp::Cancel() { 29 | if (CEF_MEMBER_MISSING(struct_, cancel)) 30 | return; 31 | 32 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 33 | 34 | // Execute 35 | struct_->cancel(struct_); 36 | } 37 | 38 | 39 | #ifndef NDEBUG 40 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/before_download_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefBeforeDownloadCallbackCToCpp::Continue(const CefString& download_path, 19 | bool show_dialog) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Unverified params: download_path 26 | 27 | // Execute 28 | struct_->cont(struct_, 29 | download_path.GetStruct(), 30 | show_dialog); 31 | } 32 | 33 | 34 | #ifndef NDEBUG 35 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 37 | 0; 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/v8handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8HandlerCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8HandlerCppToC(CefV8Handler* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/v8accessor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8AccessorCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefV8AccessorCppToC(CefV8Accessor* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/domvisitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_dom.h" 22 | #include "include/capi/cef_dom_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDOMVisitorCppToC 28 | : public CefCppToC { 29 | public: 30 | explicit CefDOMVisitorCppToC(CefDOMVisitor* cls); 31 | }; 32 | 33 | #endif // USING_CEF_SHARED 34 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 35 | 36 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/read_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefReadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefReadHandlerCppToC(CefReadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/quota_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/quota_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefQuotaCallbackCToCpp::Continue(bool allow) { 19 | if (CEF_MEMBER_MISSING(struct_, cont)) 20 | return; 21 | 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | // Execute 25 | struct_->cont(struct_, 26 | allow); 27 | } 28 | 29 | void CefQuotaCallbackCToCpp::Cancel() { 30 | if (CEF_MEMBER_MISSING(struct_, cancel)) 31 | return; 32 | 33 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 34 | 35 | // Execute 36 | struct_->cancel(struct_); 37 | } 38 | 39 | 40 | #ifndef NDEBUG 41 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/write_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWriteHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWriteHandlerCppToC(CefWriteHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/drag_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_drag_handler.h" 22 | #include "include/capi/cef_drag_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDragHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDragHandlerCppToC(CefDragHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/load_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_load_handler.h" 22 | #include "include/capi/cef_load_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefLoadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefLoadHandlerCppToC(CefLoadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /MiniServo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Minefield-1.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Minefield-2.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Minefield.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Minefield-3.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Minefield-4.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Minefield-5.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "idiom" : "mac", 41 | "size" : "256x256", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "idiom" : "mac", 46 | "size" : "256x256", 47 | "scale" : "2x" 48 | }, 49 | { 50 | "idiom" : "mac", 51 | "size" : "512x512", 52 | "scale" : "1x" 53 | }, 54 | { 55 | "idiom" : "mac", 56 | "size" : "512x512", 57 | "scale" : "2x" 58 | } 59 | ], 60 | "info" : { 61 | "version" : 1, 62 | "author" : "xcode" 63 | } 64 | } -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_ref_counted.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_ref_counted.h" 6 | #include "include/base/cef_thread_collision_warner.h" 7 | 8 | namespace base { 9 | 10 | namespace subtle { 11 | 12 | bool RefCountedThreadSafeBase::HasOneRef() const { 13 | return AtomicRefCountIsOne( 14 | &const_cast(this)->ref_count_); 15 | } 16 | 17 | RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) { 18 | #ifndef NDEBUG 19 | in_dtor_ = false; 20 | #endif 21 | } 22 | 23 | RefCountedThreadSafeBase::~RefCountedThreadSafeBase() { 24 | #ifndef NDEBUG 25 | DCHECK(in_dtor_) << "RefCountedThreadSafe object deleted without " 26 | "calling Release()"; 27 | #endif 28 | } 29 | 30 | void RefCountedThreadSafeBase::AddRef() const { 31 | #ifndef NDEBUG 32 | DCHECK(!in_dtor_); 33 | #endif 34 | AtomicRefCountInc(&ref_count_); 35 | } 36 | 37 | bool RefCountedThreadSafeBase::Release() const { 38 | #ifndef NDEBUG 39 | DCHECK(!in_dtor_); 40 | DCHECK(!AtomicRefCountIsZero(&ref_count_)); 41 | #endif 42 | if (!AtomicRefCountDec(&ref_count_)) { 43 | #ifndef NDEBUG 44 | in_dtor_ = true; 45 | #endif 46 | return true; 47 | } 48 | return false; 49 | } 50 | 51 | } // namespace subtle 52 | 53 | } // namespace base 54 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/cookie_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_cookie.h" 22 | #include "include/capi/cef_cookie_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCookieVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCookieVisitorCppToC(CefCookieVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/focus_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_focus_handler.h" 22 | #include "include/capi/cef_focus_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefFocusHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefFocusHandlerCppToC(CefFocusHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/print_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefPrintHandlerCppToC(CefPrintHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/dialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_dialog_handler.h" 22 | #include "include/capi/cef_dialog_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDialogHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDialogHandlerCppToC(CefDialogHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/render_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_render_handler.h" 22 | #include "include/capi/cef_render_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRenderHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRenderHandlerCppToC(CefRenderHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/string_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_string_visitor.h" 22 | #include "include/capi/cef_string_visitor_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStringVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefStringVisitorCppToC(CefStringVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/display_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_display_handler.h" 22 | #include "include/capi/cef_display_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDisplayHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDisplayHandlerCppToC(CefDisplayHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/request_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRequestHandlerCppToC(CefRequestHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/download_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefDownloadHandlerCppToC(CefDownloadHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_jsdialog_handler.h" 22 | #include "include/capi/cef_jsdialog_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefJSDialogHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefJSDialogHandlerCppToC(CefJSDialogHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/keyboard_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_keyboard_handler.h" 22 | #include "include/capi/cef_keyboard_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefKeyboardHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefKeyboardHandlerCppToC(CefKeyboardHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/resource_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_resource_handler.h" 22 | #include "include/capi/cef_resource_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResourceHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefResourceHandlerCppToC(CefResourceHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/urlrequest_client_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_urlrequest.h" 22 | #include "include/capi/cef_urlrequest_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefURLRequestClientCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefURLRequestClientCppToC(CefURLRequestClient* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_lock.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file is used for debugging assertion support. The Lock class 6 | // is functionally a wrapper around the LockImpl class, so the only 7 | // real intelligence in the class is in the debugging logic. 8 | 9 | #if !defined(NDEBUG) 10 | 11 | #include "include/base/cef_lock.h" 12 | #include "include/base/cef_logging.h" 13 | 14 | namespace base { 15 | 16 | Lock::Lock() : lock_() { 17 | } 18 | 19 | Lock::~Lock() { 20 | DCHECK(owning_thread_ref_.is_null()); 21 | } 22 | 23 | void Lock::AssertAcquired() const { 24 | DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); 25 | } 26 | 27 | void Lock::CheckHeldAndUnmark() { 28 | DCHECK(owning_thread_ref_ == PlatformThread::CurrentRef()); 29 | owning_thread_ref_ = PlatformThreadRef(); 30 | } 31 | 32 | void Lock::CheckUnheldAndMark() { 33 | // Hitting this DCHECK means that your code is trying to re-enter a lock that 34 | // is already held. The Chromium Lock implementation is not reentrant. 35 | // See "Why can the holder of a Lock not reacquire it?" at 36 | // http://www.chromium.org/developers/lock-and-condition-variable for more 37 | // information. 38 | DCHECK(owning_thread_ref_.is_null()); 39 | owning_thread_ref_ = PlatformThread::CurrentRef(); 40 | } 41 | 42 | } // namespace base 43 | 44 | #endif // NDEBUG 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/completion_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_callback.h" 22 | #include "include/capi/cef_callback_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCompletionCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefCompletionCallbackCppToC(CefCompletionCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_trace.h" 22 | #include "include/capi/cef_trace_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefEndTracingCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefEndTracingCallbackCppToC(CefEndTracingCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_scheme.h" 22 | #include "include/capi/cef_scheme_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefSchemeHandlerFactoryCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefSchemeHandlerFactoryCppToC(CefSchemeHandlerFactory* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/geolocation_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation_handler.h" 22 | #include "include/capi/cef_geolocation_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGeolocationHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefGeolocationHandlerCppToC(CefGeolocationHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/context_menu_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_context_menu_handler.h" 22 | #include "include/capi/cef_context_menu_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefContextMenuHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefContextMenuHandlerCppToC(CefContextMenuHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginInfoVisitorCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebPluginInfoVisitorCppToC(CefWebPluginInfoVisitor* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation.h" 22 | #include "include/capi/cef_geolocation_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGetGeolocationCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefGetGeolocationCallbackCppToC(CefGetGeolocationCallback* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_GET_GEOLOCATION_CALLBACK_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/render_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_render_process_handler.h" 22 | #include "include/capi/cef_render_process_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRenderProcessHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRenderProcessHandlerCppToC(CefRenderProcessHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/browser_process_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_browser_process_handler.h" 22 | #include "include/capi/cef_browser_process_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBrowserProcessHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefBrowserProcessHandlerCppToC(CefBrowserProcessHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/request_context_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_context_handler.h" 22 | #include "include/capi/cef_request_context_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestContextHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefRequestContextHandlerCppToC(CefRequestContextHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_resource_bundle_handler.h" 22 | #include "include/capi/cef_resource_bundle_handler_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResourceBundleHandlerCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefResourceBundleHandlerCppToC(CefResourceBundleHandler* cls); 32 | }; 33 | 34 | #endif // USING_CEF_SHARED 35 | #endif // CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 36 | 37 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/life_span_handler_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_life_span_handler.h" 22 | #include "include/capi/cef_life_span_handler_capi.h" 23 | #include "include/cef_client.h" 24 | #include "include/capi/cef_client_capi.h" 25 | #include "libcef_dll/cpptoc/cpptoc.h" 26 | 27 | // Wrap a C++ class with a C structure. 28 | // This class may be instantiated and accessed wrapper-side only. 29 | class CefLifeSpanHandlerCppToC 30 | : public CefCppToC { 32 | public: 33 | explicit CefLifeSpanHandlerCppToC(CefLifeSpanHandler* cls); 34 | }; 35 | 36 | #endif // USING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_callback.h" 22 | #include "include/capi/cef_callback_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefCallbackCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefCallbackCToCpp(cef_callback_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefCallback methods 34 | virtual void Continue() OVERRIDE; 35 | virtual void Cancel() OVERRIDE; 36 | }; 37 | 38 | #endif // USING_CEF_SHARED 39 | #endif // CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 40 | 41 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/string_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/string_visitor_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK string_visitor_visit(struct _cef_string_visitor_t* self, 19 | const cef_string_t* string) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | // Unverified params: string 26 | 27 | // Execute 28 | CefStringVisitorCppToC::Get(self)->Visit( 29 | CefString(string)); 30 | } 31 | 32 | 33 | // CONSTRUCTOR - Do not edit by hand. 34 | 35 | CefStringVisitorCppToC::CefStringVisitorCppToC(CefStringVisitor* cls) 36 | : CefCppToC( 37 | cls) { 38 | struct_.struct_.visit = string_visitor_visit; 39 | } 40 | 41 | #ifndef NDEBUG 42 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/cpptoc/cpptoc.h" 24 | 25 | // Wrap a C++ class with a C structure. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginUnstableCallbackCppToC 28 | : public CefCppToC { 30 | public: 31 | explicit CefWebPluginUnstableCallbackCppToC( 32 | CefWebPluginUnstableCallback* cls); 33 | }; 34 | 35 | #endif // USING_CEF_SHARED 36 | #endif // CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ 37 | 38 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/completion_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/completion_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK completion_callback_on_complete( 19 | struct _cef_completion_callback_t* self) { 20 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21 | 22 | DCHECK(self); 23 | if (!self) 24 | return; 25 | 26 | // Execute 27 | CefCompletionCallbackCppToC::Get(self)->OnComplete(); 28 | } 29 | 30 | 31 | // CONSTRUCTOR - Do not edit by hand. 32 | 33 | CefCompletionCallbackCppToC::CefCompletionCallbackCppToC( 34 | CefCompletionCallback* cls) 35 | : CefCppToC(cls) { 37 | struct_.struct_.on_complete = completion_callback_on_complete; 38 | } 39 | 40 | #ifndef NDEBUG 41 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 14 | #define CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_browser.h" 22 | #include "include/capi/cef_browser_capi.h" 23 | #include "include/cef_client.h" 24 | #include "include/capi/cef_client_capi.h" 25 | #include "libcef_dll/cpptoc/cpptoc.h" 26 | 27 | // Wrap a C++ class with a C structure. 28 | // This class may be instantiated and accessed wrapper-side only. 29 | class CefRunFileDialogCallbackCppToC 30 | : public CefCppToC { 32 | public: 33 | explicit CefRunFileDialogCallbackCppToC(CefRunFileDialogCallback* cls); 34 | }; 35 | 36 | #endif // USING_CEF_SHARED 37 | #endif // CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 38 | 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MiniServo for the Mac 2 | 3 | This project is designed to be used with the mainline Servo branch: 4 | 5 | https://github.com/servo/servo 6 | 7 | ## Prerequisites 8 | 9 | A fresh checkout and build of servo. For further information on building 10 | Servo for OSX, please check: 11 | 12 | https://github.com/servo/servo 13 | 14 | After you checked out servo, installed its deps and were able to build, the 15 | next step is to build the CEF port: 16 | 17 | ``` 18 | ./mach build-cef [--release] 19 | ``` 20 | 21 | ## How to build MiniServo 22 | 23 | Start by checking out the repository and its submodules: 24 | 25 | ``` 26 | git clone https://github.com/pcwalton/miniservo-mac.git 27 | cd miniservo-mac 28 | git submodule update --init --recursive 29 | 30 | #or 31 | git clone --recursive https://github.com/pcwalton/miniservo-mac.git 32 | ``` 33 | 34 | 35 | Open the project in XCode and build (Product->Build or CMD + B). In case you 36 | have build issues, double check if the submodules were really checked out. 37 | 38 | ## Run 39 | 40 | Miniservo will require access to the 'resources' folder in servo checkout. For while, 41 | copy or create a symbolic link to your Library folder: 42 | 43 | ``` 44 | cp -rp $SERVO_CHECKOUT/resources $HOME/Library/Developer/Xcode/DerivedData/MiniServo-cqxsspgatqbgifdcdvgjhrgbqygu/Build/Products/resources 45 | 46 | ``` 47 | 48 | By running miniservo (i.e. Product->Run or CMD + R), XCode will popup a dialog asking where 49 | libcef is located. It should be in your servo checkout folder (i.e. servo/ports/cef/target/release/). 50 | 51 | After this steps, enjoy running MiniServo in full parallel glory. 52 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | bool CefSchemeRegistrarCToCpp::AddCustomScheme(const CefString& scheme_name, 19 | bool is_standard, bool is_local, bool is_display_isolated) { 20 | if (CEF_MEMBER_MISSING(struct_, add_custom_scheme)) 21 | return false; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: scheme_name; type: string_byref_const 26 | DCHECK(!scheme_name.empty()); 27 | if (scheme_name.empty()) 28 | return false; 29 | 30 | // Execute 31 | int _retval = struct_->add_custom_scheme(struct_, 32 | scheme_name.GetStruct(), 33 | is_standard, 34 | is_local, 35 | is_display_isolated); 36 | 37 | // Return type: bool 38 | return _retval?true:false; 39 | } 40 | 41 | 42 | #ifndef NDEBUG 43 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/domvisitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/domvisitor_cpptoc.h" 14 | #include "libcef_dll/ctocpp/domdocument_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | void CEF_CALLBACK domvisitor_visit(struct _cef_domvisitor_t* self, 20 | struct _cef_domdocument_t* document) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: document; type: refptr_diff 27 | DCHECK(document); 28 | if (!document) 29 | return; 30 | 31 | // Execute 32 | CefDOMVisitorCppToC::Get(self)->Visit( 33 | CefDOMDocumentCToCpp::Wrap(document)); 34 | } 35 | 36 | 37 | // CONSTRUCTOR - Do not edit by hand. 38 | 39 | CefDOMVisitorCppToC::CefDOMVisitorCppToC(CefDOMVisitor* cls) 40 | : CefCppToC(cls) { 41 | struct_.struct_.visit = domvisitor_visit; 42 | } 43 | 44 | #ifndef NDEBUG 45 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/print_job_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintJobCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPrintJobCallbackCToCpp(cef_print_job_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPrintJobCallback methods 36 | virtual void Continue() OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/quota_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefQuotaCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefQuotaCallbackCToCpp(cef_quota_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefQuotaCallback methods 36 | virtual void Continue(bool allow) OVERRIDE; 37 | virtual void Cancel() OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_QUOTA_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/transfer_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #ifndef CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 6 | #define CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | #include "include/internal/cef_string_list.h" 13 | #include "include/internal/cef_string_map.h" 14 | #include "include/internal/cef_string_multimap.h" 15 | 16 | // Copy contents from one list type to another. 17 | typedef std::vector StringList; 18 | void transfer_string_list_contents(cef_string_list_t fromList, 19 | StringList& toList); 20 | void transfer_string_list_contents(const StringList& fromList, 21 | cef_string_list_t toList); 22 | 23 | // Copy contents from one map type to another. 24 | typedef std::map StringMap; 25 | void transfer_string_map_contents(cef_string_map_t fromMap, 26 | StringMap& toMap); 27 | void transfer_string_map_contents(const StringMap& fromMap, 28 | cef_string_map_t toMap); 29 | 30 | // Copy contents from one map type to another. 31 | typedef std::multimap StringMultimap; 32 | void transfer_string_multimap_contents(cef_string_multimap_t fromMap, 33 | StringMultimap& toMap); 34 | void transfer_string_multimap_contents(const StringMultimap& fromMap, 35 | cef_string_multimap_t toMap); 36 | 37 | #endif // CEF_LIBCEF_DLL_TRANSFER_UTIL_H_ 38 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" 14 | #include "libcef_dll/ctocpp/print_settings_ctocpp.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefPrintDialogCallbackCToCpp::Continue( 20 | CefRefPtr settings) { 21 | if (CEF_MEMBER_MISSING(struct_, cont)) 22 | return; 23 | 24 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 25 | 26 | // Verify param: settings; type: refptr_same 27 | DCHECK(settings.get()); 28 | if (!settings.get()) 29 | return; 30 | 31 | // Execute 32 | struct_->cont(struct_, 33 | CefPrintSettingsCToCpp::Unwrap(settings)); 34 | } 35 | 36 | void CefPrintDialogCallbackCToCpp::Cancel() { 37 | if (CEF_MEMBER_MISSING(struct_, cancel)) 38 | return; 39 | 40 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 41 | 42 | // Execute 43 | struct_->cancel(struct_); 44 | } 45 | 46 | 47 | #ifndef NDEBUG 48 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/v8stack_trace_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8StackTraceCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8StackTraceCToCpp(cef_v8stack_trace_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8StackTrace methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual int GetFrameCount() OVERRIDE; 38 | virtual CefRefPtr GetFrame(int index) OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/auth_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_auth_callback.h" 22 | #include "include/capi/cef_auth_callback_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAuthCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefAuthCallbackCToCpp(cef_auth_callback_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefAuthCallback methods 36 | virtual void Continue(const CefString& username, 37 | const CefString& password) OVERRIDE; 38 | virtual void Cancel() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_jsdialog_handler.h" 22 | #include "include/capi/cef_jsdialog_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefJSDialogCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefJSDialogCallbackCToCpp(cef_jsdialog_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefJSDialogCallback methods 36 | virtual void Continue(bool success, const CefString& user_input) OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/geolocation_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_geolocation_handler.h" 22 | #include "include/capi/cef_geolocation_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefGeolocationCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefGeolocationCallbackCToCpp(cef_geolocation_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefGeolocationCallback methods 36 | virtual void Continue(bool allow) OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/download_item_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadItemCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefDownloadItemCallbackCToCpp(cef_download_item_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefDownloadItemCallback methods 36 | virtual void Cancel() OVERRIDE; 37 | }; 38 | 39 | #endif // USING_CEF_SHARED 40 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 41 | 42 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/scheme_registrar_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_scheme.h" 22 | #include "include/capi/cef_scheme_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefSchemeRegistrarCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefSchemeRegistrarCToCpp(cef_scheme_registrar_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefSchemeRegistrar methods 36 | virtual bool AddCustomScheme(const CefString& scheme_name, bool is_standard, 37 | bool is_local, bool is_display_isolated) OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/auth_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/auth_callback_ctocpp.h" 14 | 15 | 16 | // VIRTUAL METHODS - Body may be edited by hand. 17 | 18 | void CefAuthCallbackCToCpp::Continue(const CefString& username, 19 | const CefString& password) { 20 | if (CEF_MEMBER_MISSING(struct_, cont)) 21 | return; 22 | 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | // Verify param: username; type: string_byref_const 26 | DCHECK(!username.empty()); 27 | if (username.empty()) 28 | return; 29 | // Verify param: password; type: string_byref_const 30 | DCHECK(!password.empty()); 31 | if (password.empty()) 32 | return; 33 | 34 | // Execute 35 | struct_->cont(struct_, 36 | username.GetStruct(), 37 | password.GetStruct()); 38 | } 39 | 40 | void CefAuthCallbackCToCpp::Cancel() { 41 | if (CEF_MEMBER_MISSING(struct_, cancel)) 42 | return; 43 | 44 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 45 | 46 | // Execute 47 | struct_->cancel(struct_); 48 | } 49 | 50 | 51 | #ifndef NDEBUG 52 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/web_plugin_info_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_web_plugin.h" 22 | #include "include/capi/cef_web_plugin_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefWebPluginInfoCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefWebPluginInfoCToCpp(cef_web_plugin_info_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefWebPluginInfo methods 36 | virtual CefString GetName() OVERRIDE; 37 | virtual CefString GetPath() OVERRIDE; 38 | virtual CefString GetVersion() OVERRIDE; 39 | virtual CefString GetDescription() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_print_handler.h" 22 | #include "include/capi/cef_print_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPrintDialogCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPrintDialogCallbackCToCpp(cef_print_dialog_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPrintDialogCallback methods 36 | virtual void Continue(CefRefPtr settings) OVERRIDE; 37 | virtual void Cancel() OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/request_context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_context.h" 22 | #include "include/capi/cef_request_context_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefRequestContextCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefRequestContextCToCpp(cef_request_context_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefRequestContext methods 36 | virtual bool IsSame(CefRefPtr other) OVERRIDE; 37 | virtual bool IsGlobal() OVERRIDE; 38 | virtual CefRefPtr GetHandler() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_dialog_handler.h" 23 | #include "include/capi/cef_dialog_handler_capi.h" 24 | #include "libcef_dll/ctocpp/ctocpp.h" 25 | 26 | // Wrap a C structure with a C++ class. 27 | // This class may be instantiated and accessed wrapper-side only. 28 | class CefFileDialogCallbackCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefFileDialogCallbackCToCpp(cef_file_dialog_callback_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefFileDialogCallback methods 37 | virtual void Continue(const std::vector& file_paths) OVERRIDE; 38 | virtual void Cancel() OVERRIDE; 39 | }; 40 | 41 | #endif // USING_CEF_SHARED 42 | #endif // CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 43 | 44 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/stream_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStreamReaderCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefStreamReaderCToCpp(cef_stream_reader_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefStreamReader methods 36 | virtual size_t Read(void* ptr, size_t size, size_t n) OVERRIDE; 37 | virtual int Seek(int64 offset, int whence) OVERRIDE; 38 | virtual int64 Tell() OVERRIDE; 39 | virtual int Eof() OVERRIDE; 40 | virtual bool MayBlock() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/stream_writer_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_stream.h" 22 | #include "include/capi/cef_stream_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefStreamWriterCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefStreamWriterCToCpp(cef_stream_writer_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefStreamWriter methods 36 | virtual size_t Write(const void* ptr, size_t size, size_t n) OVERRIDE; 37 | virtual int Seek(int64 offset, int whence) OVERRIDE; 38 | virtual int64 Tell() OVERRIDE; 39 | virtual int Flush() OVERRIDE; 40 | virtual bool MayBlock() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/before_download_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_handler.h" 22 | #include "include/capi/cef_download_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBeforeDownloadCallbackCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefBeforeDownloadCallbackCToCpp(cef_before_download_callback_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefBeforeDownloadCallback methods 36 | virtual void Continue(const CefString& download_path, 37 | bool show_dialog) OVERRIDE; 38 | }; 39 | 40 | #endif // USING_CEF_SHARED 41 | #endif // CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 42 | 43 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/binary_value_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_values.h" 22 | #include "include/capi/cef_values_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefBinaryValueCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefBinaryValueCToCpp(cef_binary_value_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefBinaryValue methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsOwned() OVERRIDE; 38 | virtual CefRefPtr Copy() OVERRIDE; 39 | virtual size_t GetSize() OVERRIDE; 40 | virtual size_t GetData(void* buffer, size_t buffer_size, 41 | size_t data_offset) OVERRIDE; 42 | }; 43 | 44 | #endif // USING_CEF_SHARED 45 | #endif // CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 46 | 47 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/urlrequest_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_urlrequest.h" 22 | #include "include/capi/cef_urlrequest_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefURLRequestCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefURLRequestCToCpp(cef_urlrequest_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefURLRequest methods 34 | virtual CefRefPtr GetRequest() OVERRIDE; 35 | virtual CefRefPtr GetClient() OVERRIDE; 36 | virtual Status GetRequestStatus() OVERRIDE; 37 | virtual ErrorCode GetRequestError() OVERRIDE; 38 | virtual CefRefPtr GetResponse() OVERRIDE; 39 | virtual void Cancel() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /MiniServo/MSStatusBarCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSStatusBarCell.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/26/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSStatusBarCell.h" 10 | 11 | @implementation MSStatusBarCell 12 | 13 | -(void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { 14 | [NSGraphicsContext saveGraphicsState]; 15 | 16 | NSBezierPath *boundingPath = 17 | [NSBezierPath bezierPathWithRoundedRect:NSMakeRect(cellFrame.origin.x - 16.0, 18 | cellFrame.origin.y + 1.0, 19 | cellFrame.size.width + 15.0, 20 | cellFrame.size.height + 16.0) 21 | xRadius:3.0 22 | yRadius:3.0]; 23 | 24 | [NSGraphicsContext saveGraphicsState]; 25 | [boundingPath addClip]; 26 | [[[NSGradient alloc] initWithColors: 27 | [NSArray arrayWithObjects: 28 | [NSColor whiteColor], 29 | [NSColor colorWithCalibratedRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0], 30 | nil]] drawInRect:cellFrame angle:90.0]; 31 | [NSGraphicsContext restoreGraphicsState]; 32 | 33 | [[NSColor colorWithCalibratedRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0] set]; 34 | [boundingPath stroke]; 35 | [NSGraphicsContext restoreGraphicsState]; 36 | 37 | [super drawInteriorWithFrame:NSMakeRect(cellFrame.origin.x, 38 | cellFrame.origin.y + 3.0, 39 | cellFrame.size.width, 40 | cellFrame.size.height - 3.0) 41 | inView:controlView]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/post_data_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPostDataCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefPostDataCToCpp(cef_post_data_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefPostData methods 34 | virtual bool IsReadOnly() OVERRIDE; 35 | virtual size_t GetElementCount() OVERRIDE; 36 | virtual void GetElements(ElementVector& elements) OVERRIDE; 37 | virtual bool RemoveElement(CefRefPtr element) OVERRIDE; 38 | virtual bool AddElement(CefRefPtr element) OVERRIDE; 39 | virtual void RemoveElements() OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK end_tracing_callback_on_end_tracing_complete( 19 | struct _cef_end_tracing_callback_t* self, 20 | const cef_string_t* tracing_file) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: tracing_file; type: string_byref_const 27 | DCHECK(tracing_file); 28 | if (!tracing_file) 29 | return; 30 | 31 | // Execute 32 | CefEndTracingCallbackCppToC::Get(self)->OnEndTracingComplete( 33 | CefString(tracing_file)); 34 | } 35 | 36 | 37 | // CONSTRUCTOR - Do not edit by hand. 38 | 39 | CefEndTracingCallbackCppToC::CefEndTracingCallbackCppToC( 40 | CefEndTracingCallback* cls) 41 | : CefCppToC(cls) { 43 | struct_.struct_.on_end_tracing_complete = 44 | end_tracing_callback_on_end_tracing_complete; 45 | } 46 | 47 | #ifndef NDEBUG 48 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/task_runner_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_task.h" 22 | #include "include/capi/cef_task_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefTaskRunnerCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefTaskRunnerCToCpp(cef_task_runner_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefTaskRunner methods 34 | virtual bool IsSame(CefRefPtr that) OVERRIDE; 35 | virtual bool BelongsToCurrentThread() OVERRIDE; 36 | virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; 37 | virtual bool PostTask(CefRefPtr task) OVERRIDE; 38 | virtual bool PostDelayedTask(CefRefPtr task, 39 | int64 delay_ms) OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/process_message_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_process_message.h" 22 | #include "include/capi/cef_process_message_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefProcessMessageCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefProcessMessageCToCpp(cef_process_message_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefProcessMessage methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsReadOnly() OVERRIDE; 38 | virtual CefRefPtr Copy() OVERRIDE; 39 | virtual CefString GetName() OVERRIDE; 40 | virtual CefRefPtr GetArgumentList() OVERRIDE; 41 | }; 42 | 43 | #endif // USING_CEF_SHARED 44 | #endif // CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 45 | 46 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/request_context_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | cef_cookie_manager_t* CEF_CALLBACK request_context_handler_get_cookie_manager( 20 | struct _cef_request_context_handler_t* self) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return NULL; 26 | 27 | // Execute 28 | CefRefPtr _retval = CefRequestContextHandlerCppToC::Get( 29 | self)->GetCookieManager(); 30 | 31 | // Return type: refptr_diff 32 | return CefCookieManagerCToCpp::Unwrap(_retval); 33 | } 34 | 35 | 36 | // CONSTRUCTOR - Do not edit by hand. 37 | 38 | CefRequestContextHandlerCppToC::CefRequestContextHandlerCppToC( 39 | CefRequestContextHandler* cls) 40 | : CefCppToC(cls) { 42 | struct_.struct_.get_cookie_manager = 43 | request_context_handler_get_cookie_manager; 44 | } 45 | 46 | #ifndef NDEBUG 47 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /cef3/libcef_dll/wrapper/cef_byte_read_handler.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | 5 | #include "include/wrapper/cef_byte_read_handler.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size, 12 | CefRefPtr source) 13 | : bytes_(bytes), size_(size), offset_(0), source_(source) { 14 | } 15 | 16 | size_t CefByteReadHandler::Read(void* ptr, size_t size, size_t n) { 17 | base::AutoLock lock_scope(lock_); 18 | size_t s = static_cast(size_ - offset_) / size; 19 | size_t ret = std::min(n, s); 20 | memcpy(ptr, bytes_ + offset_, ret * size); 21 | offset_ += ret * size; 22 | return ret; 23 | } 24 | 25 | int CefByteReadHandler::Seek(int64 offset, int whence) { 26 | int rv = -1L; 27 | base::AutoLock lock_scope(lock_); 28 | switch (whence) { 29 | case SEEK_CUR: 30 | if (offset_ + offset > size_ || offset_ + offset < 0) 31 | break; 32 | offset_ += offset; 33 | rv = 0; 34 | break; 35 | case SEEK_END: { 36 | #if defined(OS_WIN) 37 | int64 offset_abs = _abs64(offset); 38 | #else 39 | int64 offset_abs = std::abs(offset); 40 | #endif 41 | if (offset_abs > size_) 42 | break; 43 | offset_ = size_ - offset_abs; 44 | rv = 0; 45 | break; 46 | } 47 | case SEEK_SET: 48 | if (offset > size_ || offset < 0) 49 | break; 50 | offset_ = offset; 51 | rv = 0; 52 | break; 53 | } 54 | 55 | return rv; 56 | } 57 | 58 | int64 CefByteReadHandler::Tell() { 59 | base::AutoLock lock_scope(lock_); 60 | return offset_; 61 | } 62 | 63 | int CefByteReadHandler::Eof() { 64 | base::AutoLock lock_scope(lock_); 65 | return (offset_ >= size_); 66 | } 67 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/v8exception_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8ExceptionCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8ExceptionCToCpp(cef_v8exception_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8Exception methods 36 | virtual CefString GetMessage() OVERRIDE; 37 | virtual CefString GetSourceLine() OVERRIDE; 38 | virtual CefString GetScriptResourceName() OVERRIDE; 39 | virtual int GetLineNumber() OVERRIDE; 40 | virtual int GetStartPosition() OVERRIDE; 41 | virtual int GetEndPosition() OVERRIDE; 42 | virtual int GetStartColumn() OVERRIDE; 43 | virtual int GetEndColumn() OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/allow_certificate_error_callback_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request_handler.h" 22 | #include "include/capi/cef_request_handler_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefAllowCertificateErrorCallbackCToCpp 28 | : public CefCToCpp { 31 | public: 32 | explicit CefAllowCertificateErrorCallbackCToCpp( 33 | cef_allow_certificate_error_callback_t* str) 34 | : CefCToCpp(str) {} 37 | 38 | // CefAllowCertificateErrorCallback methods 39 | virtual void Continue(bool allow) OVERRIDE; 40 | }; 41 | 42 | #endif // USING_CEF_SHARED 43 | #endif // CEF_LIBCEF_DLL_CTOCPP_ALLOW_CERTIFICATE_ERROR_CALLBACK_CTOCPP_H_ 44 | 45 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/v8stack_frame_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8StackFrameCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefV8StackFrameCToCpp(cef_v8stack_frame_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefV8StackFrame methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual CefString GetScriptName() OVERRIDE; 38 | virtual CefString GetScriptNameOrSourceURL() OVERRIDE; 39 | virtual CefString GetFunctionName() OVERRIDE; 40 | virtual int GetLineNumber() OVERRIDE; 41 | virtual int GetColumn() OVERRIDE; 42 | virtual bool IsEval() OVERRIDE; 43 | virtual bool IsConstructor() OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK web_plugin_unstable_callback_is_unstable( 19 | struct _cef_web_plugin_unstable_callback_t* self, const cef_string_t* path, 20 | int unstable) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: path; type: string_byref_const 27 | DCHECK(path); 28 | if (!path) 29 | return; 30 | 31 | // Execute 32 | CefWebPluginUnstableCallbackCppToC::Get(self)->IsUnstable( 33 | CefString(path), 34 | unstable?true:false); 35 | } 36 | 37 | 38 | // CONSTRUCTOR - Do not edit by hand. 39 | 40 | CefWebPluginUnstableCallbackCppToC::CefWebPluginUnstableCallbackCppToC( 41 | CefWebPluginUnstableCallback* cls) 42 | : CefCppToC( 44 | cls) { 45 | struct_.struct_.is_unstable = web_plugin_unstable_callback_is_unstable; 46 | } 47 | 48 | #ifndef NDEBUG 49 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" 14 | #include "libcef_dll/transfer_util.h" 15 | 16 | 17 | // VIRTUAL METHODS - Body may be edited by hand. 18 | 19 | void CefFileDialogCallbackCToCpp::Continue( 20 | const std::vector& file_paths) { 21 | if (CEF_MEMBER_MISSING(struct_, cont)) 22 | return; 23 | 24 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 25 | 26 | // Translate param: file_paths; type: string_vec_byref_const 27 | cef_string_list_t file_pathsList = cef_string_list_alloc(); 28 | DCHECK(file_pathsList); 29 | if (file_pathsList) 30 | transfer_string_list_contents(file_paths, file_pathsList); 31 | 32 | // Execute 33 | struct_->cont(struct_, 34 | file_pathsList); 35 | 36 | // Restore param:file_paths; type: string_vec_byref_const 37 | if (file_pathsList) 38 | cef_string_list_free(file_pathsList); 39 | } 40 | 41 | void CefFileDialogCallbackCToCpp::Cancel() { 42 | if (CEF_MEMBER_MISSING(struct_, cancel)) 43 | return; 44 | 45 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 46 | 47 | // Execute 48 | struct_->cancel(struct_); 49 | } 50 | 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCToCpp::DebugObjCt = 0; 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" 14 | #include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" 15 | 16 | 17 | // MEMBER FUNCTIONS - Body may be edited by hand. 18 | 19 | int CEF_CALLBACK web_plugin_info_visitor_visit( 20 | struct _cef_web_plugin_info_visitor_t* self, cef_web_plugin_info_t* info, 21 | int count, int total) { 22 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23 | 24 | DCHECK(self); 25 | if (!self) 26 | return 0; 27 | // Verify param: info; type: refptr_diff 28 | DCHECK(info); 29 | if (!info) 30 | return 0; 31 | 32 | // Execute 33 | bool _retval = CefWebPluginInfoVisitorCppToC::Get(self)->Visit( 34 | CefWebPluginInfoCToCpp::Wrap(info), 35 | count, 36 | total); 37 | 38 | // Return type: bool 39 | return _retval; 40 | } 41 | 42 | 43 | // CONSTRUCTOR - Do not edit by hand. 44 | 45 | CefWebPluginInfoVisitorCppToC::CefWebPluginInfoVisitorCppToC( 46 | CefWebPluginInfoVisitor* cls) 47 | : CefCppToC(cls) { 49 | struct_.struct_.visit = web_plugin_info_visitor_visit; 50 | } 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/post_data_element_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_request.h" 22 | #include "include/capi/cef_request_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefPostDataElementCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefPostDataElementCToCpp(cef_post_data_element_t* str) 32 | : CefCToCpp(str) {} 34 | 35 | // CefPostDataElement methods 36 | virtual bool IsReadOnly() OVERRIDE; 37 | virtual void SetToEmpty() OVERRIDE; 38 | virtual void SetToFile(const CefString& fileName) OVERRIDE; 39 | virtual void SetToBytes(size_t size, const void* bytes) OVERRIDE; 40 | virtual Type GetType() OVERRIDE; 41 | virtual CefString GetFile() OVERRIDE; 42 | virtual size_t GetBytesCount() OVERRIDE; 43 | virtual size_t GetBytes(size_t size, void* bytes) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/v8context_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_v8.h" 22 | #include "include/capi/cef_v8_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefV8ContextCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefV8ContextCToCpp(cef_v8context_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefV8Context methods 34 | virtual CefRefPtr GetTaskRunner() OVERRIDE; 35 | virtual bool IsValid() OVERRIDE; 36 | virtual CefRefPtr GetBrowser() OVERRIDE; 37 | virtual CefRefPtr GetFrame() OVERRIDE; 38 | virtual CefRefPtr GetGlobal() OVERRIDE; 39 | virtual bool Enter() OVERRIDE; 40 | virtual bool Exit() OVERRIDE; 41 | virtual bool IsSame(CefRefPtr that) OVERRIDE; 42 | virtual bool Eval(const CefString& code, CefRefPtr& retval, 43 | CefRefPtr& exception) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/response_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_response.h" 22 | #include "include/capi/cef_response_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefResponseCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefResponseCToCpp(cef_response_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefResponse methods 34 | virtual bool IsReadOnly() OVERRIDE; 35 | virtual int GetStatus() OVERRIDE; 36 | virtual void SetStatus(int status) OVERRIDE; 37 | virtual CefString GetStatusText() OVERRIDE; 38 | virtual void SetStatusText(const CefString& statusText) OVERRIDE; 39 | virtual CefString GetMimeType() OVERRIDE; 40 | virtual void SetMimeType(const CefString& mimeType) OVERRIDE; 41 | virtual CefString GetHeader(const CefString& name) OVERRIDE; 42 | virtual void GetHeaderMap(HeaderMap& headerMap) OVERRIDE; 43 | virtual void SetHeaderMap(const HeaderMap& headerMap) OVERRIDE; 44 | }; 45 | 46 | #endif // USING_CEF_SHARED 47 | #endif // CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 48 | 49 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | void CEF_CALLBACK get_geolocation_callback_on_location_update( 19 | struct _cef_get_geolocation_callback_t* self, 20 | const struct _cef_geoposition_t* position) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return; 26 | // Verify param: position; type: struct_byref_const 27 | DCHECK(position); 28 | if (!position) 29 | return; 30 | 31 | // Translate param: position; type: struct_byref_const 32 | CefGeoposition positionObj; 33 | if (position) 34 | positionObj.Set(*position, false); 35 | 36 | // Execute 37 | CefGetGeolocationCallbackCppToC::Get(self)->OnLocationUpdate( 38 | positionObj); 39 | } 40 | 41 | 42 | // CONSTRUCTOR - Do not edit by hand. 43 | 44 | CefGetGeolocationCallbackCppToC::CefGetGeolocationCallbackCppToC( 45 | CefGetGeolocationCallback* cls) 46 | : CefCppToC(cls) { 48 | struct_.struct_.on_location_update = 49 | get_geolocation_callback_on_location_update; 50 | } 51 | 52 | #ifndef NDEBUG 53 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 55 | 0; 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /MiniServo/MSTabStyle.m: -------------------------------------------------------------------------------- 1 | // 2 | // MSTabStyle.m 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/25/14. 6 | // Copyright (c) 2014 Mozilla Corporation. All rights reserved. 7 | // 8 | 9 | #import "MSTabStyle.h" 10 | #import 11 | #import 12 | #import 13 | 14 | @implementation MSTabStyle 15 | 16 | - (NSAttributedString *)attributedStringValueForTabCell:(MMTabBarButtonCell *)cell { 17 | NSMutableAttributedString *attrStr; 18 | NSString *contents = [cell title]; 19 | attrStr = [[NSMutableAttributedString alloc] initWithString:contents]; 20 | NSRange range = NSMakeRange(0, [contents length]); 21 | 22 | // Add font attribute 23 | [attrStr addAttribute:NSFontAttributeName value:[NSFont boldSystemFontOfSize:11.0] range:range]; 24 | [attrStr addAttribute:NSForegroundColorAttributeName value:[[NSColor textColor] colorWithAlphaComponent:0.75] range:range]; 25 | 26 | // Add shadow attribute 27 | NSShadow* shadow; 28 | shadow = [[NSShadow alloc] init]; 29 | CGFloat shadowAlpha; 30 | if (([cell state] == NSOnState) || [cell mouseHovered]) { 31 | shadowAlpha = 0.8; 32 | } else { 33 | shadowAlpha = 0.5; 34 | } 35 | [shadow setShadowColor:[NSColor colorWithCalibratedWhite:1.0 alpha:shadowAlpha]]; 36 | [shadow setShadowOffset:NSMakeSize(0, -1)]; 37 | [shadow setShadowBlurRadius:1.0]; 38 | [attrStr addAttribute:NSShadowAttributeName value:shadow range:range]; 39 | 40 | // Paragraph Style for Truncating Long Text 41 | static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil; 42 | if (!TruncatingTailParagraphStyle) { 43 | TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; 44 | [TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; 45 | [TruncatingTailParagraphStyle setAlignment:NSCenterTextAlignment]; 46 | } 47 | [attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range]; 48 | 49 | return attrStr; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/drag_handler_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/drag_handler_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_ctocpp.h" 15 | #include "libcef_dll/ctocpp/drag_data_ctocpp.h" 16 | 17 | 18 | // MEMBER FUNCTIONS - Body may be edited by hand. 19 | 20 | int CEF_CALLBACK drag_handler_on_drag_enter(struct _cef_drag_handler_t* self, 21 | cef_browser_t* browser, cef_drag_data_t* dragData, 22 | cef_drag_operations_mask_t mask) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return 0; 28 | // Verify param: browser; type: refptr_diff 29 | DCHECK(browser); 30 | if (!browser) 31 | return 0; 32 | // Verify param: dragData; type: refptr_diff 33 | DCHECK(dragData); 34 | if (!dragData) 35 | return 0; 36 | 37 | // Execute 38 | bool _retval = CefDragHandlerCppToC::Get(self)->OnDragEnter( 39 | CefBrowserCToCpp::Wrap(browser), 40 | CefDragDataCToCpp::Wrap(dragData), 41 | mask); 42 | 43 | // Return type: bool 44 | return _retval; 45 | } 46 | 47 | 48 | // CONSTRUCTOR - Do not edit by hand. 49 | 50 | CefDragHandlerCppToC::CefDragHandlerCppToC(CefDragHandler* cls) 51 | : CefCppToC(cls) { 52 | struct_.struct_.on_drag_enter = drag_handler_on_drag_enter; 53 | } 54 | 55 | #ifndef NDEBUG 56 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/zip_reader_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_zip_reader.h" 22 | #include "include/capi/cef_zip_reader_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefZipReaderCToCpp 28 | : public CefCToCpp { 29 | public: 30 | explicit CefZipReaderCToCpp(cef_zip_reader_t* str) 31 | : CefCToCpp(str) {} 32 | 33 | // CefZipReader methods 34 | virtual bool MoveToFirstFile() OVERRIDE; 35 | virtual bool MoveToNextFile() OVERRIDE; 36 | virtual bool MoveToFile(const CefString& fileName, 37 | bool caseSensitive) OVERRIDE; 38 | virtual bool Close() OVERRIDE; 39 | virtual CefString GetFileName() OVERRIDE; 40 | virtual int64 GetFileSize() OVERRIDE; 41 | virtual time_t GetFileLastModified() OVERRIDE; 42 | virtual bool OpenFile(const CefString& password) OVERRIDE; 43 | virtual bool CloseFile() OVERRIDE; 44 | virtual int ReadFile(void* buffer, size_t bufferSize) OVERRIDE; 45 | virtual int64 Tell() OVERRIDE; 46 | virtual bool Eof() OVERRIDE; 47 | }; 48 | 49 | #endif // USING_CEF_SHARED 50 | #endif // CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 51 | 52 | -------------------------------------------------------------------------------- /cef3/libcef_dll/base/cef_weak_ptr.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "include/base/cef_weak_ptr.h" 6 | 7 | namespace base { 8 | namespace internal { 9 | 10 | WeakReference::Flag::Flag() : is_valid_(true) { 11 | // Flags only become bound when checked for validity, or invalidated, 12 | // so that we can check that later validity/invalidation operations on 13 | // the same Flag take place on the same thread. 14 | thread_checker_.DetachFromThread(); 15 | } 16 | 17 | void WeakReference::Flag::Invalidate() { 18 | // The flag being invalidated with a single ref implies that there are no 19 | // weak pointers in existence. Allow deletion on other thread in this case. 20 | DCHECK(thread_checker_.CalledOnValidThread() || HasOneRef()) 21 | << "WeakPtrs must be invalidated on the same thread."; 22 | is_valid_ = false; 23 | } 24 | 25 | bool WeakReference::Flag::IsValid() const { 26 | DCHECK(thread_checker_.CalledOnValidThread()) 27 | << "WeakPtrs must be checked on the same thread."; 28 | return is_valid_; 29 | } 30 | 31 | WeakReference::Flag::~Flag() { 32 | } 33 | 34 | WeakReference::WeakReference() { 35 | } 36 | 37 | WeakReference::WeakReference(const Flag* flag) : flag_(flag) { 38 | } 39 | 40 | WeakReference::~WeakReference() { 41 | } 42 | 43 | bool WeakReference::is_valid() const { return flag_.get() && flag_->IsValid(); } 44 | 45 | WeakReferenceOwner::WeakReferenceOwner() { 46 | } 47 | 48 | WeakReferenceOwner::~WeakReferenceOwner() { 49 | Invalidate(); 50 | } 51 | 52 | WeakReference WeakReferenceOwner::GetRef() const { 53 | // If we hold the last reference to the Flag then create a new one. 54 | if (!HasRefs()) 55 | flag_ = new WeakReference::Flag(); 56 | 57 | return WeakReference(flag_.get()); 58 | } 59 | 60 | void WeakReferenceOwner::Invalidate() { 61 | if (flag_.get()) { 62 | flag_->Invalidate(); 63 | flag_ = NULL; 64 | } 65 | } 66 | 67 | WeakPtrBase::WeakPtrBase() { 68 | } 69 | 70 | WeakPtrBase::~WeakPtrBase() { 71 | } 72 | 73 | WeakPtrBase::WeakPtrBase(const WeakReference& ref) : ref_(ref) { 74 | } 75 | 76 | } // namespace internal 77 | } // namespace base 78 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/cookie_manager_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include 22 | #include "include/cef_cookie.h" 23 | #include "include/capi/cef_cookie_capi.h" 24 | #include "libcef_dll/ctocpp/ctocpp.h" 25 | 26 | // Wrap a C structure with a C++ class. 27 | // This class may be instantiated and accessed wrapper-side only. 28 | class CefCookieManagerCToCpp 29 | : public CefCToCpp { 31 | public: 32 | explicit CefCookieManagerCToCpp(cef_cookie_manager_t* str) 33 | : CefCToCpp(str) {} 35 | 36 | // CefCookieManager methods 37 | virtual void SetSupportedSchemes( 38 | const std::vector& schemes) OVERRIDE; 39 | virtual bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; 40 | virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, 41 | CefRefPtr visitor) OVERRIDE; 42 | virtual bool SetCookie(const CefString& url, 43 | const CefCookie& cookie) OVERRIDE; 44 | virtual bool DeleteCookies(const CefString& url, 45 | const CefString& cookie_name) OVERRIDE; 46 | virtual bool SetStoragePath(const CefString& path, 47 | bool persist_session_cookies) OVERRIDE; 48 | virtual bool FlushStore(CefRefPtr callback) OVERRIDE; 49 | }; 50 | 51 | #endif // USING_CEF_SHARED 52 | #endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 53 | 54 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" 14 | #include "libcef_dll/ctocpp/browser_host_ctocpp.h" 15 | #include "libcef_dll/transfer_util.h" 16 | 17 | 18 | // MEMBER FUNCTIONS - Body may be edited by hand. 19 | 20 | void CEF_CALLBACK run_file_dialog_callback_cont( 21 | struct _cef_run_file_dialog_callback_t* self, 22 | struct _cef_browser_host_t* browser_host, cef_string_list_t file_paths) { 23 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 24 | 25 | DCHECK(self); 26 | if (!self) 27 | return; 28 | // Verify param: browser_host; type: refptr_diff 29 | DCHECK(browser_host); 30 | if (!browser_host) 31 | return; 32 | // Verify param: file_paths; type: string_vec_byref_const 33 | DCHECK(file_paths); 34 | if (!file_paths) 35 | return; 36 | 37 | // Translate param: file_paths; type: string_vec_byref_const 38 | std::vector file_pathsList; 39 | transfer_string_list_contents(file_paths, file_pathsList); 40 | 41 | // Execute 42 | CefRunFileDialogCallbackCppToC::Get(self)->OnFileDialogDismissed( 43 | CefBrowserHostCToCpp::Wrap(browser_host), 44 | file_pathsList); 45 | } 46 | 47 | 48 | // CONSTRUCTOR - Do not edit by hand. 49 | 50 | CefRunFileDialogCallbackCppToC::CefRunFileDialogCallbackCppToC( 51 | CefRunFileDialogCallback* cls) 52 | : CefCppToC(cls) { 54 | struct_.struct_.cont = run_file_dialog_callback_cont; 55 | } 56 | 57 | #ifndef NDEBUG 58 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /cef3/libcef_dll/ctocpp/download_item_ctocpp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 14 | #define CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 15 | #pragma once 16 | 17 | #ifndef USING_CEF_SHARED 18 | #pragma message("Warning: "__FILE__" may be accessed wrapper-side only") 19 | #else // USING_CEF_SHARED 20 | 21 | #include "include/cef_download_item.h" 22 | #include "include/capi/cef_download_item_capi.h" 23 | #include "libcef_dll/ctocpp/ctocpp.h" 24 | 25 | // Wrap a C structure with a C++ class. 26 | // This class may be instantiated and accessed wrapper-side only. 27 | class CefDownloadItemCToCpp 28 | : public CefCToCpp { 30 | public: 31 | explicit CefDownloadItemCToCpp(cef_download_item_t* str) 32 | : CefCToCpp( 33 | str) {} 34 | 35 | // CefDownloadItem methods 36 | virtual bool IsValid() OVERRIDE; 37 | virtual bool IsInProgress() OVERRIDE; 38 | virtual bool IsComplete() OVERRIDE; 39 | virtual bool IsCanceled() OVERRIDE; 40 | virtual int64 GetCurrentSpeed() OVERRIDE; 41 | virtual int GetPercentComplete() OVERRIDE; 42 | virtual int64 GetTotalBytes() OVERRIDE; 43 | virtual int64 GetReceivedBytes() OVERRIDE; 44 | virtual CefTime GetStartTime() OVERRIDE; 45 | virtual CefTime GetEndTime() OVERRIDE; 46 | virtual CefString GetFullPath() OVERRIDE; 47 | virtual uint32 GetId() OVERRIDE; 48 | virtual CefString GetURL() OVERRIDE; 49 | virtual CefString GetSuggestedFileName() OVERRIDE; 50 | virtual CefString GetContentDisposition() OVERRIDE; 51 | virtual CefString GetMimeType() OVERRIDE; 52 | }; 53 | 54 | #endif // USING_CEF_SHARED 55 | #endif // CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 56 | 57 | -------------------------------------------------------------------------------- /cef3/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights 2 | // reserved. Use of this source code is governed by a BSD-style license that 3 | // can be found in the LICENSE file. 4 | // 5 | // --------------------------------------------------------------------------- 6 | // 7 | // This file was generated by the CEF translator tool. If making changes by 8 | // hand only do so within the body of existing method and function 9 | // implementations. See the translator.README.txt file in the tools directory 10 | // for more information. 11 | // 12 | 13 | #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" 14 | 15 | 16 | // MEMBER FUNCTIONS - Body may be edited by hand. 17 | 18 | int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self, 19 | const struct _cef_cookie_t* cookie, int count, int total, 20 | int* deleteCookie) { 21 | // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 22 | 23 | DCHECK(self); 24 | if (!self) 25 | return 0; 26 | // Verify param: cookie; type: struct_byref_const 27 | DCHECK(cookie); 28 | if (!cookie) 29 | return 0; 30 | // Verify param: deleteCookie; type: bool_byref 31 | DCHECK(deleteCookie); 32 | if (!deleteCookie) 33 | return 0; 34 | 35 | // Translate param: cookie; type: struct_byref_const 36 | CefCookie cookieObj; 37 | if (cookie) 38 | cookieObj.Set(*cookie, false); 39 | // Translate param: deleteCookie; type: bool_byref 40 | bool deleteCookieBool = (deleteCookie && *deleteCookie)?true:false; 41 | 42 | // Execute 43 | bool _retval = CefCookieVisitorCppToC::Get(self)->Visit( 44 | cookieObj, 45 | count, 46 | total, 47 | deleteCookieBool); 48 | 49 | // Restore param: deleteCookie; type: bool_byref 50 | if (deleteCookie) 51 | *deleteCookie = deleteCookieBool?true:false; 52 | 53 | // Return type: bool 54 | return _retval; 55 | } 56 | 57 | 58 | // CONSTRUCTOR - Do not edit by hand. 59 | 60 | CefCookieVisitorCppToC::CefCookieVisitorCppToC(CefCookieVisitor* cls) 61 | : CefCppToC( 62 | cls) { 63 | struct_.struct_.visit = cookie_visitor_visit; 64 | } 65 | 66 | #ifndef NDEBUG 67 | template<> base::AtomicRefCount CefCppToC::DebugObjCt = 0; 69 | #endif 70 | 71 | -------------------------------------------------------------------------------- /cef3/include/internal/cef_export.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights 2 | // reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the name Chromium Embedded 15 | // Framework nor the names of its contributors may be used to endorse 16 | // or promote products derived from this software without specific prior 17 | // written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 32 | #define CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 33 | #pragma once 34 | 35 | #include "include/base/cef_build.h" 36 | 37 | #if defined(COMPILER_MSVC) 38 | 39 | #ifdef BUILDING_CEF_SHARED 40 | #define CEF_EXPORT __declspec(dllexport) 41 | #elif USING_CEF_SHARED 42 | #define CEF_EXPORT __declspec(dllimport) 43 | #else 44 | #define CEF_EXPORT 45 | #endif 46 | #define CEF_CALLBACK __stdcall 47 | 48 | #elif defined(COMPILER_GCC) 49 | 50 | #define CEF_EXPORT __attribute__ ((visibility("default"))) 51 | #define CEF_CALLBACK 52 | 53 | #endif // COMPILER_GCC 54 | 55 | #endif // CEF_INCLUDE_INTERNAL_CEF_EXPORT_H_ 56 | -------------------------------------------------------------------------------- /MiniServo/MSCEFClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // MSCEFClient.h 3 | // MiniServo 4 | // 5 | // Created by Patrick Walton on 11/6/14. 6 | // Copyright (c) 2014 Mozilla Foundation. All rights reserved. 7 | // 8 | 9 | #ifndef __MiniServo__MSCEFClient__ 10 | #define __MiniServo__MSCEFClient__ 11 | 12 | #import "MSWebView.h" 13 | #include 14 | 15 | @class MSAppDelegate; 16 | 17 | class MSCEFClient : public CefClient, 18 | public CefLoadHandler, 19 | public CefRenderHandler, 20 | public CefStringVisitor { 21 | public: 22 | explicit MSCEFClient(MSAppDelegate* appDelegate, MSWebView* view) 23 | : mAppDelegate(appDelegate), mView(view) {} 24 | 25 | // CefClient implementation 26 | virtual CefRefPtr GetLoadHandler() override; 27 | virtual CefRefPtr GetRenderHandler() override; 28 | 29 | // CefLoadHandler implementation 30 | virtual void OnLoadingStateChange(CefRefPtr browser, 31 | bool isLoading, 32 | bool canGoBack, 33 | bool canGoForward) override; 34 | virtual void OnLoadEnd(CefRefPtr browser, 35 | CefRefPtr frame, 36 | int httpStatusCode) override; 37 | 38 | // CefRenderHandler implementation 39 | virtual bool GetViewRect(CefRefPtr browser, CefRect& rect) override; 40 | virtual bool GetBackingRect(CefRefPtr browser, CefRect& rect) override; 41 | virtual void OnPaint(CefRefPtr browser, 42 | CefRenderHandler::PaintElementType type, 43 | const CefRenderHandler::RectList& dirtyRects, 44 | const void* buffer, 45 | int width, 46 | int height) override; 47 | virtual void OnPresent(CefRefPtr browser) override; 48 | 49 | // CefStringVisitor implementation (for tab titles) 50 | virtual void Visit(const CefString& string) override; 51 | 52 | private: 53 | IMPLEMENT_REFCOUNTING(MSCEFClient); 54 | DISALLOW_COPY_AND_ASSIGN(MSCEFClient); 55 | 56 | MSAppDelegate* mAppDelegate; 57 | MSWebView* mView; 58 | }; 59 | 60 | #endif /* defined(__MiniServo__MSCEFClient__) */ 61 | --------------------------------------------------------------------------------