├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── app └── win │ ├── .gitignore │ ├── brightray_example.rc │ └── resource.h ├── brightray_example.gyp ├── browser ├── browser_client.cc ├── browser_client.h ├── browser_main_parts.cc ├── browser_main_parts.h ├── linux │ └── application_info_linux.cc ├── mac │ ├── Info.plist │ ├── MainMenu.xib │ ├── WindowController.xib │ ├── window_controller.h │ ├── window_controller.mm │ ├── window_mac.h │ └── window_mac.mm ├── views │ ├── window_views.cc │ └── window_views.h ├── window.cc └── window.h ├── common ├── library_main.cc ├── library_main.h ├── main.cc ├── main_delegate.cc └── main_delegate.h ├── renderer ├── mac │ └── Info.plist ├── render_view_observer.cc ├── render_view_observer.h ├── renderer_client.cc └── renderer_client.h ├── script ├── bootstrap ├── build └── cibuild └── tools ├── linux └── copy-chrome-sandbox.sh └── mac └── create-framework-subdir-symlinks.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.vcxproj* 2 | /*.xcodeproj/ 3 | /build/ 4 | 5 | # Visual Studio 6 | /*.opensdf 7 | /*.sdf 8 | /*.sln 9 | /*.suo 10 | /ipch/ 11 | 12 | # Linux 13 | Makefile 14 | *.Makefile 15 | *.mk 16 | out/ 17 | 18 | # Vim 19 | /*.swp 20 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/brightray"] 2 | path = vendor/brightray 3 | url = https://github.com/electron/brightray 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Adam Roben 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Brightray Example 2 | 3 | This is an example app that uses 4 | [Brightray](https://github.com/electron/brightray). 5 | 6 | ## Development 7 | 8 | ### Prerequisites 9 | 10 | * Python 2.7 11 | * Mac: 12 | * Xcode 13 | * Windows: 14 | * Visual Studio 2010 SP1 15 | 16 | ### One-time setup 17 | 18 | You must previously have built and uploaded libchromiumcontent using its 19 | `script/upload` script. 20 | 21 | $ script/bootstrap http://base.url.com/used/by/script/upload 22 | 23 | ### Building 24 | 25 | $ script/build 26 | 27 | This will build the app into the `build` directory. 28 | 29 | ### Running 30 | 31 | Run `out/Debug/brightray_example` 32 | 33 | On Linux, you'll need libchromiumcontent.so in your library path. Run 34 | this first: `export LD_LIBRARY_PATH=$PWD/vendor/brightray/vendor/download/libchromiumcontent/Release` 35 | 36 | On Linux, you'll also need to copy the Chrome SUID sandbox or explicitly run 37 | without it. Any of these three choices should work: 38 | 39 | * Run `tools/linux/copy-chrome-sandbox.sh` to install the sandbox. The 40 | script must be run as root. 41 | * Use the sandbox from an existing installed Chrome: `CHROME_DEVEL_SANDBOX=/usr/lib/chromium-browser/chrome-sandbox out/Debug/brightray_example` 42 | * Use no sandbox: `out/Debug/brightray_example --disable-setuid-sandbox` 43 | 44 | ## License 45 | 46 | See the [`LICENSE`](LICENSE) file. 47 | -------------------------------------------------------------------------------- /app/win/.gitignore: -------------------------------------------------------------------------------- 1 | /*.aps 2 | -------------------------------------------------------------------------------- /app/win/brightray_example.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/electron-archive/brightray_example/e63037889244d51dff84203062073d55d1b94e95/app/win/brightray_example.rc -------------------------------------------------------------------------------- /app/win/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by brightray_example.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /brightray_example.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 3 | 'project_name': 'brightray_example', 4 | 'product_name': 'Brightray Example', 5 | 'app_sources': [ 6 | 'app/win/brightray_example.rc', 7 | 'app/win/resource.h', 8 | 'common/main.cc', 9 | ], 10 | 'lib_sources': [ 11 | 'browser/browser_client.cc', 12 | 'browser/browser_client.h', 13 | 'browser/browser_main_parts.cc', 14 | 'browser/browser_main_parts.h', 15 | 'browser/mac/window_controller.mm', 16 | 'browser/mac/window_controller.h', 17 | 'browser/mac/window_mac.h', 18 | 'browser/mac/window_mac.mm', 19 | 'browser/views/window_views.cc', 20 | 'browser/views/window_views.h', 21 | 'browser/linux/application_info_linux.cc', 22 | 'browser/window.cc', 23 | 'browser/window.h', 24 | 'common/main_delegate.cc', 25 | 'common/main_delegate.h', 26 | 'renderer/render_view_observer.cc', 27 | 'renderer/render_view_observer.h', 28 | 'renderer/renderer_client.cc', 29 | 'renderer/renderer_client.h', 30 | ], 31 | 'framework_sources': [ 32 | 'common/library_main.cc', 33 | 'common/library_main.h', 34 | ], 35 | 'conditions': [ 36 | ['OS=="win"', { 37 | 'app_sources': [ 38 | '<(libchromiumcontent_src_dir)/content/app/startup_helper_win.cc', 39 | ], 40 | }], 41 | ], 42 | }, 43 | 'includes': [ 44 | 'vendor/brightray/brightray.gypi', 45 | ], 46 | 'targets': [ 47 | { 48 | 'target_name': '<(project_name)', 49 | 'type': 'executable', 50 | 'dependencies': [ 51 | '<(project_name)_lib', 52 | ], 53 | 'sources': [ 54 | '<@(app_sources)', 55 | ], 56 | 'conditions': [ 57 | ['OS=="mac"', { 58 | 'product_name': '<(product_name)', 59 | 'mac_bundle': 1, 60 | 'dependencies!': [ 61 | '<(project_name)_lib', 62 | ], 63 | 'dependencies': [ 64 | '<(project_name)_framework', 65 | '<(project_name)_helper', 66 | ], 67 | 'xcode_settings': { 68 | 'INFOPLIST_FILE': 'browser/mac/Info.plist', 69 | 'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../Frameworks', 70 | }, 71 | 'copies': [ 72 | { 73 | 'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Frameworks', 74 | 'files': [ 75 | '<(PRODUCT_DIR)/<(product_name) Helper.app', 76 | '<(PRODUCT_DIR)/<(product_name) Framework.framework', 77 | ], 78 | }, 79 | ], 80 | 'postbuilds': [ 81 | { 82 | # This postbuid step is responsible for creating the following 83 | # helpers: 84 | # 85 | # <(product_name) EH.app and <(product_name) NP.app are created 86 | # from <(product_name).app. 87 | # 88 | # The EH helper is marked for an executable heap. The NP helper 89 | # is marked for no PIE (ASLR). 90 | 'postbuild_name': 'Make More Helpers', 91 | 'action': [ 92 | 'vendor/brightray/tools/mac/make_more_helpers.sh', 93 | 'Frameworks', 94 | '<(product_name)', 95 | ], 96 | }, 97 | ] 98 | }], 99 | ['OS=="win"', { 100 | 'copies': [ 101 | { 102 | 'destination': '<(PRODUCT_DIR)', 103 | 'files': [ 104 | '<(libchromiumcontent_library_dir)/chromiumcontent.dll', 105 | '<(libchromiumcontent_library_dir)/content_shell.pak', 106 | '<(libchromiumcontent_library_dir)/icudtl.dat', 107 | '<(libchromiumcontent_library_dir)/libGLESv2.dll', 108 | ], 109 | }, 110 | ], 111 | }], 112 | ], 113 | }, 114 | { 115 | 'target_name': '<(project_name)_lib', 116 | 'type': 'static_library', 117 | 'dependencies': [ 118 | 'vendor/brightray/brightray.gyp:brightray', 119 | ], 120 | 'sources': [ 121 | '<@(lib_sources)', 122 | ], 123 | 'include_dirs': [ 124 | '.', 125 | ], 126 | 'direct_dependent_settings': { 127 | 'include_dirs': [ 128 | '.', 129 | ], 130 | }, 131 | 'export_dependent_settings': [ 132 | 'vendor/brightray/brightray.gyp:brightray', 133 | ], 134 | 'conditions': [ 135 | ['OS!="linux"', { 136 | 'sources/': [ 137 | ['exclude', '/linux/'], 138 | ['exclude', '_linux\.(cc|h)$'], 139 | ], 140 | }], 141 | ['OS!="mac"', { 142 | 'sources/': [ 143 | ['exclude', '/mac/'], 144 | ['exclude', '_mac\.(mm|h)$'], 145 | ], 146 | },{ 147 | 'sources/': [ 148 | ['exclude', '/views/'], 149 | ['exclude', '_views\.(cc|h)$'], 150 | ], 151 | }], 152 | ['OS!="win"', { 153 | 'sources/': [ 154 | ['exclude', '/win/'], 155 | ['exclude', '_win\.(cc|h)$'], 156 | ], 157 | }], 158 | ], 159 | }, 160 | ], 161 | 'conditions': [ 162 | ['OS=="mac"', { 163 | 'targets': [ 164 | { 165 | 'target_name': '<(project_name)_framework', 166 | 'product_name': '<(product_name) Framework', 167 | 'type': 'shared_library', 168 | 'dependencies': [ 169 | '<(project_name)_lib', 170 | ], 171 | 'sources': [ 172 | '<@(framework_sources)', 173 | ], 174 | 'mac_bundle': 1, 175 | 'mac_bundle_resources': [ 176 | 'browser/mac/MainMenu.xib', 177 | 'browser/mac/WindowController.xib', 178 | '<(libchromiumcontent_resources_dir)/content_shell.pak', 179 | '<(libchromiumcontent_resources_dir)/icudtl.dat', 180 | ], 181 | 'xcode_settings': { 182 | 'LIBRARY_SEARCH_PATHS': '<(libchromiumcontent_library_dir)', 183 | 'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework', 184 | 'LD_RUNPATH_SEARCH_PATHS': '@loader_path/Libraries', 185 | 'OTHER_LDFLAGS': [ 186 | '-ObjC', 187 | ], 188 | }, 189 | 'copies': [ 190 | { 191 | 'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries', 192 | 'files': [ 193 | '<(libchromiumcontent_library_dir)/ffmpegsumo.so', 194 | '<(libchromiumcontent_library_dir)/libchromiumcontent.dylib', 195 | ], 196 | }, 197 | ], 198 | 'postbuilds': [ 199 | { 200 | 'postbuild_name': 'Add symlinks for framework subdirectories', 201 | 'action': [ 202 | 'tools/mac/create-framework-subdir-symlinks.sh', 203 | '<(product_name) Framework', 204 | 'Libraries', 205 | 'Frameworks', 206 | ], 207 | }, 208 | ], 209 | 'export_dependent_settings': [ 210 | '<(project_name)_lib', 211 | ], 212 | }, 213 | { 214 | 'target_name': '<(project_name)_helper', 215 | 'product_name': '<(product_name) Helper', 216 | 'type': 'executable', 217 | 'dependencies': [ 218 | '<(project_name)_framework', 219 | ], 220 | 'sources': [ 221 | '<@(app_sources)', 222 | ], 223 | 'mac_bundle': 1, 224 | 'xcode_settings': { 225 | 'INFOPLIST_FILE': 'renderer/mac/Info.plist', 226 | 'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../../../../Frameworks', 227 | }, 228 | }, 229 | ], 230 | }], 231 | ], 232 | } 233 | -------------------------------------------------------------------------------- /browser/browser_client.cc: -------------------------------------------------------------------------------- 1 | #include "browser/browser_client.h" 2 | 3 | #include "browser/browser_main_parts.h" 4 | 5 | namespace brightray_example { 6 | 7 | BrowserClient::BrowserClient() { 8 | } 9 | 10 | BrowserClient::~BrowserClient() { 11 | } 12 | 13 | brightray::BrowserMainParts* BrowserClient::OverrideCreateBrowserMainParts(const content::MainFunctionParams&) { 14 | return new BrowserMainParts; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /browser/browser_client.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_BROWSER_CLIENT_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_BROWSER_CLIENT_H_ 3 | 4 | #include "brightray/browser/browser_client.h" 5 | 6 | namespace brightray_example { 7 | 8 | class BrowserClient : public brightray::BrowserClient { 9 | public: 10 | BrowserClient(); 11 | ~BrowserClient(); 12 | 13 | private: 14 | brightray::BrowserMainParts* OverrideCreateBrowserMainParts(const content::MainFunctionParams&) override; 15 | 16 | DISALLOW_COPY_AND_ASSIGN(BrowserClient); 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /browser/browser_main_parts.cc: -------------------------------------------------------------------------------- 1 | #include "browser/browser_main_parts.h" 2 | 3 | #include "browser/window.h" 4 | 5 | namespace brightray_example { 6 | 7 | BrowserMainParts::BrowserMainParts() { 8 | } 9 | 10 | BrowserMainParts::~BrowserMainParts() { 11 | } 12 | 13 | void BrowserMainParts::PreMainMessageLoopRun() { 14 | brightray::BrowserMainParts::PreMainMessageLoopRun(); 15 | 16 | auto window = Window::Create(browser_context()); 17 | window->Show(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /browser/browser_main_parts.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_BROWSER_MAIN_PARTS_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_BROWSER_MAIN_PARTS_H_ 3 | 4 | #include "brightray/browser/browser_main_parts.h" 5 | 6 | namespace brightray_example { 7 | 8 | class BrowserMainParts : public brightray::BrowserMainParts { 9 | public: 10 | BrowserMainParts(); 11 | ~BrowserMainParts(); 12 | 13 | protected: 14 | void PreMainMessageLoopRun() override; 15 | 16 | DISALLOW_COPY_AND_ASSIGN(BrowserMainParts); 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /browser/linux/application_info_linux.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "base/logging.h" 3 | 4 | namespace brightray { 5 | 6 | // TODO: move these to brightray and derive them from the running binary if possible 7 | std::string GetApplicationName() { return "Brightray Example"; } 8 | std::string GetApplicationVersion() { return "0.0.0.1"; } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /browser/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | org.roben.brightray.example 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | NSMainNibFile 10 | MainMenu 11 | NSPrincipalClass 12 | BRYApplication 13 | NSSupportsAutomaticGraphicsSwitching 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /browser/mac/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1070 5 | 12C60 6 | 3084 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.CocoaPlugin 11 | 3084 12 | 13 | 14 | NSCustomObject 15 | NSMenu 16 | NSMenuItem 17 | 18 | 19 | com.apple.InterfaceBuilder.CocoaPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | BRYApplication 28 | 29 | 30 | FirstResponder 31 | 32 | 33 | NSApplication 34 | 35 | 36 | NSFontManager 37 | 38 | 39 | Main Menu 40 | 41 | 42 | 43 | Brightray Example 44 | 45 | 2147483647 46 | 47 | NSImage 48 | NSMenuCheckmark 49 | 50 | 51 | NSImage 52 | NSMenuMixedState 53 | 54 | submenuAction: 55 | 56 | Brightray Example 57 | 58 | 59 | 60 | About Brightray Example 61 | 62 | 2147483647 63 | 64 | 65 | 66 | 67 | 68 | YES 69 | YES 70 | 71 | 72 | 2147483647 73 | 74 | 75 | 76 | 77 | 78 | Preferences… 79 | , 80 | 1048576 81 | 2147483647 82 | 83 | 84 | 85 | 86 | 87 | YES 88 | YES 89 | 90 | 91 | 2147483647 92 | 93 | 94 | 95 | 96 | 97 | Services 98 | 99 | 2147483647 100 | 101 | 102 | submenuAction: 103 | 104 | Services 105 | 106 | _NSServicesMenu 107 | 108 | 109 | 110 | 111 | YES 112 | YES 113 | 114 | 115 | 2147483647 116 | 117 | 118 | 119 | 120 | 121 | Hide Brightray Example 122 | h 123 | 1048576 124 | 2147483647 125 | 126 | 127 | 128 | 129 | 130 | Hide Others 131 | h 132 | 1572864 133 | 2147483647 134 | 135 | 136 | 137 | 138 | 139 | Show All 140 | 141 | 2147483647 142 | 143 | 144 | 145 | 146 | 147 | YES 148 | YES 149 | 150 | 151 | 2147483647 152 | 153 | 154 | 155 | 156 | 157 | Quit Brightray Example 158 | q 159 | 1048576 160 | 2147483647 161 | 162 | 163 | 164 | 165 | _NSAppleMenu 166 | 167 | 168 | 169 | 170 | File 171 | 172 | 2147483647 173 | 174 | 175 | submenuAction: 176 | 177 | File 178 | 179 | 180 | 181 | New 182 | n 183 | 1048576 184 | 2147483647 185 | 186 | 187 | 188 | 189 | 190 | Open… 191 | o 192 | 1048576 193 | 2147483647 194 | 195 | 196 | 197 | 198 | 199 | Open Recent 200 | 201 | 2147483647 202 | 203 | 204 | submenuAction: 205 | 206 | Open Recent 207 | 208 | 209 | 210 | Clear Menu 211 | 212 | 2147483647 213 | 214 | 215 | 216 | 217 | _NSRecentDocumentsMenu 218 | 219 | 220 | 221 | 222 | YES 223 | YES 224 | 225 | 226 | 2147483647 227 | 228 | 229 | 230 | 231 | 232 | Close 233 | w 234 | 1048576 235 | 2147483647 236 | 237 | 238 | 239 | 240 | 241 | Save… 242 | s 243 | 1048576 244 | 2147483647 245 | 246 | 247 | 248 | 249 | 250 | Revert to Saved 251 | 252 | 2147483647 253 | 254 | 255 | 256 | 257 | 258 | YES 259 | YES 260 | 261 | 262 | 2147483647 263 | 264 | 265 | 266 | 267 | 268 | Page Setup... 269 | P 270 | 1179648 271 | 2147483647 272 | 273 | 274 | 275 | 276 | 277 | 278 | Print… 279 | p 280 | 1048576 281 | 2147483647 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | Edit 291 | 292 | 2147483647 293 | 294 | 295 | submenuAction: 296 | 297 | Edit 298 | 299 | 300 | 301 | Undo 302 | z 303 | 1048576 304 | 2147483647 305 | 306 | 307 | 308 | 309 | 310 | Redo 311 | Z 312 | 1048576 313 | 2147483647 314 | 315 | 316 | 317 | 318 | 319 | YES 320 | YES 321 | 322 | 323 | 2147483647 324 | 325 | 326 | 327 | 328 | 329 | Cut 330 | x 331 | 1048576 332 | 2147483647 333 | 334 | 335 | 336 | 337 | 338 | Copy 339 | c 340 | 1048576 341 | 2147483647 342 | 343 | 344 | 345 | 346 | 347 | Paste 348 | v 349 | 1048576 350 | 2147483647 351 | 352 | 353 | 354 | 355 | 356 | Paste and Match Style 357 | V 358 | 1572864 359 | 2147483647 360 | 361 | 362 | 363 | 364 | 365 | Delete 366 | 367 | 2147483647 368 | 369 | 370 | 371 | 372 | 373 | Select All 374 | a 375 | 1048576 376 | 2147483647 377 | 378 | 379 | 380 | 381 | 382 | YES 383 | YES 384 | 385 | 386 | 2147483647 387 | 388 | 389 | 390 | 391 | 392 | Find 393 | 394 | 2147483647 395 | 396 | 397 | submenuAction: 398 | 399 | Find 400 | 401 | 402 | 403 | Find… 404 | f 405 | 1048576 406 | 2147483647 407 | 408 | 409 | 1 410 | 411 | 412 | 413 | Find and Replace… 414 | f 415 | 1572864 416 | 2147483647 417 | 418 | 419 | 12 420 | 421 | 422 | 423 | Find Next 424 | g 425 | 1048576 426 | 2147483647 427 | 428 | 429 | 2 430 | 431 | 432 | 433 | Find Previous 434 | G 435 | 1048576 436 | 2147483647 437 | 438 | 439 | 3 440 | 441 | 442 | 443 | Use Selection for Find 444 | e 445 | 1048576 446 | 2147483647 447 | 448 | 449 | 7 450 | 451 | 452 | 453 | Jump to Selection 454 | j 455 | 1048576 456 | 2147483647 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | Spelling and Grammar 466 | 467 | 2147483647 468 | 469 | 470 | submenuAction: 471 | 472 | Spelling 473 | 474 | 475 | 476 | Show Spelling and Grammar 477 | : 478 | 1048576 479 | 2147483647 480 | 481 | 482 | 483 | 484 | 485 | Check Document Now 486 | ; 487 | 1048576 488 | 2147483647 489 | 490 | 491 | 492 | 493 | 494 | YES 495 | YES 496 | 497 | 498 | 2147483647 499 | 500 | 501 | 502 | 503 | 504 | Check Spelling While Typing 505 | 506 | 2147483647 507 | 508 | 509 | 510 | 511 | 512 | Check Grammar With Spelling 513 | 514 | 2147483647 515 | 516 | 517 | 518 | 519 | 520 | Correct Spelling Automatically 521 | 522 | 2147483647 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | Substitutions 532 | 533 | 2147483647 534 | 535 | 536 | submenuAction: 537 | 538 | Substitutions 539 | 540 | 541 | 542 | Show Substitutions 543 | 544 | 2147483647 545 | 546 | 547 | 548 | 549 | 550 | YES 551 | YES 552 | 553 | 554 | 2147483647 555 | 556 | 557 | 558 | 559 | 560 | Smart Copy/Paste 561 | 562 | 2147483647 563 | 564 | 565 | 566 | 567 | 568 | Smart Quotes 569 | 570 | 2147483647 571 | 572 | 573 | 574 | 575 | 576 | Smart Dashes 577 | 578 | 2147483647 579 | 580 | 581 | 582 | 583 | 584 | Smart Links 585 | 586 | 2147483647 587 | 588 | 589 | 590 | 591 | 592 | Data Detectors 593 | 594 | 2147483647 595 | 596 | 597 | 598 | 599 | 600 | Text Replacement 601 | 602 | 2147483647 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | Transformations 612 | 613 | 2147483647 614 | 615 | 616 | submenuAction: 617 | 618 | Transformations 619 | 620 | 621 | 622 | Make Upper Case 623 | 624 | 2147483647 625 | 626 | 627 | 628 | 629 | 630 | Make Lower Case 631 | 632 | 2147483647 633 | 634 | 635 | 636 | 637 | 638 | Capitalize 639 | 640 | 2147483647 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | Speech 650 | 651 | 2147483647 652 | 653 | 654 | submenuAction: 655 | 656 | Speech 657 | 658 | 659 | 660 | Start Speaking 661 | 662 | 2147483647 663 | 664 | 665 | 666 | 667 | 668 | Stop Speaking 669 | 670 | 2147483647 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | Format 683 | 684 | 2147483647 685 | 686 | 687 | submenuAction: 688 | 689 | Format 690 | 691 | 692 | 693 | Font 694 | 695 | 2147483647 696 | 697 | 698 | submenuAction: 699 | 700 | Font 701 | 702 | 703 | 704 | Show Fonts 705 | t 706 | 1048576 707 | 2147483647 708 | 709 | 710 | 711 | 712 | 713 | Bold 714 | b 715 | 1048576 716 | 2147483647 717 | 718 | 719 | 2 720 | 721 | 722 | 723 | Italic 724 | i 725 | 1048576 726 | 2147483647 727 | 728 | 729 | 1 730 | 731 | 732 | 733 | Underline 734 | u 735 | 1048576 736 | 2147483647 737 | 738 | 739 | 740 | 741 | 742 | YES 743 | YES 744 | 745 | 746 | 2147483647 747 | 748 | 749 | 750 | 751 | 752 | Bigger 753 | + 754 | 1048576 755 | 2147483647 756 | 757 | 758 | 3 759 | 760 | 761 | 762 | Smaller 763 | - 764 | 1048576 765 | 2147483647 766 | 767 | 768 | 4 769 | 770 | 771 | 772 | YES 773 | YES 774 | 775 | 776 | 2147483647 777 | 778 | 779 | 780 | 781 | 782 | Kern 783 | 784 | 2147483647 785 | 786 | 787 | submenuAction: 788 | 789 | Kern 790 | 791 | 792 | 793 | Use Default 794 | 795 | 2147483647 796 | 797 | 798 | 799 | 800 | 801 | Use None 802 | 803 | 2147483647 804 | 805 | 806 | 807 | 808 | 809 | Tighten 810 | 811 | 2147483647 812 | 813 | 814 | 815 | 816 | 817 | Loosen 818 | 819 | 2147483647 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | Ligatures 829 | 830 | 2147483647 831 | 832 | 833 | submenuAction: 834 | 835 | Ligatures 836 | 837 | 838 | 839 | Use Default 840 | 841 | 2147483647 842 | 843 | 844 | 845 | 846 | 847 | Use None 848 | 849 | 2147483647 850 | 851 | 852 | 853 | 854 | 855 | Use All 856 | 857 | 2147483647 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | Baseline 867 | 868 | 2147483647 869 | 870 | 871 | submenuAction: 872 | 873 | Baseline 874 | 875 | 876 | 877 | Use Default 878 | 879 | 2147483647 880 | 881 | 882 | 883 | 884 | 885 | Superscript 886 | 887 | 2147483647 888 | 889 | 890 | 891 | 892 | 893 | Subscript 894 | 895 | 2147483647 896 | 897 | 898 | 899 | 900 | 901 | Raise 902 | 903 | 2147483647 904 | 905 | 906 | 907 | 908 | 909 | Lower 910 | 911 | 2147483647 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | YES 921 | YES 922 | 923 | 924 | 2147483647 925 | 926 | 927 | 928 | 929 | 930 | Show Colors 931 | C 932 | 1048576 933 | 2147483647 934 | 935 | 936 | 937 | 938 | 939 | YES 940 | YES 941 | 942 | 943 | 2147483647 944 | 945 | 946 | 947 | 948 | 949 | Copy Style 950 | c 951 | 1572864 952 | 2147483647 953 | 954 | 955 | 956 | 957 | 958 | Paste Style 959 | v 960 | 1572864 961 | 2147483647 962 | 963 | 964 | 965 | 966 | _NSFontMenu 967 | 968 | 969 | 970 | 971 | Text 972 | 973 | 2147483647 974 | 975 | 976 | submenuAction: 977 | 978 | Text 979 | 980 | 981 | 982 | Align Left 983 | { 984 | 1048576 985 | 2147483647 986 | 987 | 988 | 989 | 990 | 991 | Center 992 | | 993 | 1048576 994 | 2147483647 995 | 996 | 997 | 998 | 999 | 1000 | Justify 1001 | 1002 | 2147483647 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | Align Right 1009 | } 1010 | 1048576 1011 | 2147483647 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | YES 1018 | YES 1019 | 1020 | 1021 | 2147483647 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | Writing Direction 1028 | 1029 | 2147483647 1030 | 1031 | 1032 | submenuAction: 1033 | 1034 | Writing Direction 1035 | 1036 | 1037 | 1038 | YES 1039 | Paragraph 1040 | 1041 | 2147483647 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | CURlZmF1bHQ 1048 | 1049 | 2147483647 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | CUxlZnQgdG8gUmlnaHQ 1056 | 1057 | 2147483647 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | CVJpZ2h0IHRvIExlZnQ 1064 | 1065 | 2147483647 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | YES 1072 | YES 1073 | 1074 | 1075 | 2147483647 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | YES 1082 | Selection 1083 | 1084 | 2147483647 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | CURlZmF1bHQ 1091 | 1092 | 2147483647 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | CUxlZnQgdG8gUmlnaHQ 1099 | 1100 | 2147483647 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | CVJpZ2h0IHRvIExlZnQ 1107 | 1108 | 2147483647 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | YES 1118 | YES 1119 | 1120 | 1121 | 2147483647 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | Show Ruler 1128 | 1129 | 2147483647 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | Copy Ruler 1136 | c 1137 | 1310720 1138 | 2147483647 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | Paste Ruler 1145 | v 1146 | 1310720 1147 | 2147483647 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | View 1160 | 1161 | 2147483647 1162 | 1163 | 1164 | submenuAction: 1165 | 1166 | View 1167 | 1168 | 1169 | 1170 | Show Toolbar 1171 | t 1172 | 1572864 1173 | 2147483647 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | Customize Toolbar… 1180 | 1181 | 2147483647 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | YES 1188 | YES 1189 | 1190 | 1191 | 2147483647 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | Show Developer Tools 1198 | i 1199 | 1572864 1200 | 2147483647 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | Window 1210 | 1211 | 2147483647 1212 | 1213 | 1214 | submenuAction: 1215 | 1216 | Window 1217 | 1218 | 1219 | 1220 | Minimize 1221 | m 1222 | 1048576 1223 | 2147483647 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | Zoom 1230 | 1231 | 2147483647 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | YES 1238 | YES 1239 | 1240 | 1241 | 2147483647 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | Bring All to Front 1248 | 1249 | 2147483647 1250 | 1251 | 1252 | 1253 | 1254 | _NSWindowsMenu 1255 | 1256 | 1257 | 1258 | 1259 | Help 1260 | 1261 | 2147483647 1262 | 1263 | 1264 | submenuAction: 1265 | 1266 | Help 1267 | 1268 | 1269 | 1270 | Brightray Example Help 1271 | ? 1272 | 1048576 1273 | 2147483647 1274 | 1275 | 1276 | 1277 | 1278 | _NSHelpMenu 1279 | 1280 | 1281 | 1282 | _NSMainMenu 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | orderFrontStandardAboutPanel: 1290 | 1291 | 1292 | 1293 | 142 1294 | 1295 | 1296 | 1297 | performMiniaturize: 1298 | 1299 | 1300 | 1301 | 37 1302 | 1303 | 1304 | 1305 | arrangeInFront: 1306 | 1307 | 1308 | 1309 | 39 1310 | 1311 | 1312 | 1313 | print: 1314 | 1315 | 1316 | 1317 | 86 1318 | 1319 | 1320 | 1321 | runPageLayout: 1322 | 1323 | 1324 | 1325 | 87 1326 | 1327 | 1328 | 1329 | clearRecentDocuments: 1330 | 1331 | 1332 | 1333 | 127 1334 | 1335 | 1336 | 1337 | performClose: 1338 | 1339 | 1340 | 1341 | 193 1342 | 1343 | 1344 | 1345 | performZoom: 1346 | 1347 | 1348 | 1349 | 240 1350 | 1351 | 1352 | 1353 | showHelp: 1354 | 1355 | 1356 | 1357 | 360 1358 | 1359 | 1360 | 1361 | saveDocument: 1362 | 1363 | 1364 | 1365 | 362 1366 | 1367 | 1368 | 1369 | revertDocumentToSaved: 1370 | 1371 | 1372 | 1373 | 364 1374 | 1375 | 1376 | 1377 | runToolbarCustomizationPalette: 1378 | 1379 | 1380 | 1381 | 365 1382 | 1383 | 1384 | 1385 | toggleToolbarShown: 1386 | 1387 | 1388 | 1389 | 366 1390 | 1391 | 1392 | 1393 | hide: 1394 | 1395 | 1396 | 1397 | 367 1398 | 1399 | 1400 | 1401 | hideOtherApplications: 1402 | 1403 | 1404 | 1405 | 368 1406 | 1407 | 1408 | 1409 | terminate: 1410 | 1411 | 1412 | 1413 | 369 1414 | 1415 | 1416 | 1417 | unhideAllApplications: 1418 | 1419 | 1420 | 1421 | 370 1422 | 1423 | 1424 | 1425 | raiseBaseline: 1426 | 1427 | 1428 | 1429 | 423 1430 | 1431 | 1432 | 1433 | lowerBaseline: 1434 | 1435 | 1436 | 1437 | 424 1438 | 1439 | 1440 | 1441 | copyFont: 1442 | 1443 | 1444 | 1445 | 425 1446 | 1447 | 1448 | 1449 | subscript: 1450 | 1451 | 1452 | 1453 | 426 1454 | 1455 | 1456 | 1457 | superscript: 1458 | 1459 | 1460 | 1461 | 427 1462 | 1463 | 1464 | 1465 | tightenKerning: 1466 | 1467 | 1468 | 1469 | 428 1470 | 1471 | 1472 | 1473 | underline: 1474 | 1475 | 1476 | 1477 | 429 1478 | 1479 | 1480 | 1481 | orderFrontColorPanel: 1482 | 1483 | 1484 | 1485 | 430 1486 | 1487 | 1488 | 1489 | useAllLigatures: 1490 | 1491 | 1492 | 1493 | 431 1494 | 1495 | 1496 | 1497 | loosenKerning: 1498 | 1499 | 1500 | 1501 | 432 1502 | 1503 | 1504 | 1505 | pasteFont: 1506 | 1507 | 1508 | 1509 | 433 1510 | 1511 | 1512 | 1513 | unscript: 1514 | 1515 | 1516 | 1517 | 434 1518 | 1519 | 1520 | 1521 | useStandardKerning: 1522 | 1523 | 1524 | 1525 | 435 1526 | 1527 | 1528 | 1529 | useStandardLigatures: 1530 | 1531 | 1532 | 1533 | 436 1534 | 1535 | 1536 | 1537 | turnOffLigatures: 1538 | 1539 | 1540 | 1541 | 437 1542 | 1543 | 1544 | 1545 | turnOffKerning: 1546 | 1547 | 1548 | 1549 | 438 1550 | 1551 | 1552 | 1553 | alignLeft: 1554 | 1555 | 1556 | 1557 | 439 1558 | 1559 | 1560 | 1561 | alignJustified: 1562 | 1563 | 1564 | 1565 | 440 1566 | 1567 | 1568 | 1569 | copyRuler: 1570 | 1571 | 1572 | 1573 | 441 1574 | 1575 | 1576 | 1577 | alignCenter: 1578 | 1579 | 1580 | 1581 | 442 1582 | 1583 | 1584 | 1585 | toggleRuler: 1586 | 1587 | 1588 | 1589 | 443 1590 | 1591 | 1592 | 1593 | alignRight: 1594 | 1595 | 1596 | 1597 | 444 1598 | 1599 | 1600 | 1601 | pasteRuler: 1602 | 1603 | 1604 | 1605 | 445 1606 | 1607 | 1608 | 1609 | capitalizeWord: 1610 | 1611 | 1612 | 1613 | 737 1614 | 1615 | 1616 | 1617 | cut: 1618 | 1619 | 1620 | 1621 | 738 1622 | 1623 | 1624 | 1625 | paste: 1626 | 1627 | 1628 | 1629 | 739 1630 | 1631 | 1632 | 1633 | toggleSmartInsertDelete: 1634 | 1635 | 1636 | 1637 | 740 1638 | 1639 | 1640 | 1641 | toggleAutomaticQuoteSubstitution: 1642 | 1643 | 1644 | 1645 | 741 1646 | 1647 | 1648 | 1649 | redo: 1650 | 1651 | 1652 | 1653 | 742 1654 | 1655 | 1656 | 1657 | toggleAutomaticDashSubstitution: 1658 | 1659 | 1660 | 1661 | 743 1662 | 1663 | 1664 | 1665 | toggleContinuousSpellChecking: 1666 | 1667 | 1668 | 1669 | 744 1670 | 1671 | 1672 | 1673 | toggleAutomaticDataDetection: 1674 | 1675 | 1676 | 1677 | 745 1678 | 1679 | 1680 | 1681 | undo: 1682 | 1683 | 1684 | 1685 | 746 1686 | 1687 | 1688 | 1689 | toggleGrammarChecking: 1690 | 1691 | 1692 | 1693 | 747 1694 | 1695 | 1696 | 1697 | startSpeaking: 1698 | 1699 | 1700 | 1701 | 748 1702 | 1703 | 1704 | 1705 | showGuessPanel: 1706 | 1707 | 1708 | 1709 | 749 1710 | 1711 | 1712 | 1713 | checkSpelling: 1714 | 1715 | 1716 | 1717 | 750 1718 | 1719 | 1720 | 1721 | pasteAsPlainText: 1722 | 1723 | 1724 | 1725 | 751 1726 | 1727 | 1728 | 1729 | copy: 1730 | 1731 | 1732 | 1733 | 752 1734 | 1735 | 1736 | 1737 | delete: 1738 | 1739 | 1740 | 1741 | 753 1742 | 1743 | 1744 | 1745 | lowercaseWord: 1746 | 1747 | 1748 | 1749 | 754 1750 | 1751 | 1752 | 1753 | selectAll: 1754 | 1755 | 1756 | 1757 | 755 1758 | 1759 | 1760 | 1761 | stopSpeaking: 1762 | 1763 | 1764 | 1765 | 756 1766 | 1767 | 1768 | 1769 | orderFrontSubstitutionsPanel: 1770 | 1771 | 1772 | 1773 | 757 1774 | 1775 | 1776 | 1777 | toggleAutomaticTextReplacement: 1778 | 1779 | 1780 | 1781 | 758 1782 | 1783 | 1784 | 1785 | toggleAutomaticLinkDetection: 1786 | 1787 | 1788 | 1789 | 759 1790 | 1791 | 1792 | 1793 | toggleAutomaticSpellingCorrection: 1794 | 1795 | 1796 | 1797 | 760 1798 | 1799 | 1800 | 1801 | uppercaseWord: 1802 | 1803 | 1804 | 1805 | 761 1806 | 1807 | 1808 | 1809 | performFindPanelAction: 1810 | 1811 | 1812 | 1813 | 768 1814 | 1815 | 1816 | 1817 | performFindPanelAction: 1818 | 1819 | 1820 | 1821 | 769 1822 | 1823 | 1824 | 1825 | performFindPanelAction: 1826 | 1827 | 1828 | 1829 | 770 1830 | 1831 | 1832 | 1833 | centerSelectionInVisibleArea: 1834 | 1835 | 1836 | 1837 | 771 1838 | 1839 | 1840 | 1841 | performFindPanelAction: 1842 | 1843 | 1844 | 1845 | 772 1846 | 1847 | 1848 | 1849 | makeBaseWritingDirectionNatural: 1850 | 1851 | 1852 | 1853 | 785 1854 | 1855 | 1856 | 1857 | makeBaseWritingDirectionLeftToRight: 1858 | 1859 | 1860 | 1861 | 786 1862 | 1863 | 1864 | 1865 | makeBaseWritingDirectionRightToLeft: 1866 | 1867 | 1868 | 1869 | 787 1870 | 1871 | 1872 | 1873 | makeTextWritingDirectionNatural: 1874 | 1875 | 1876 | 1877 | 788 1878 | 1879 | 1880 | 1881 | makeTextWritingDirectionLeftToRight: 1882 | 1883 | 1884 | 1885 | 789 1886 | 1887 | 1888 | 1889 | makeTextWritingDirectionRightToLeft: 1890 | 1891 | 1892 | 1893 | 790 1894 | 1895 | 1896 | 1897 | performFindPanelAction: 1898 | 1899 | 1900 | 1901 | 792 1902 | 1903 | 1904 | 1905 | showDevTools: 1906 | 1907 | 1908 | 1909 | 801 1910 | 1911 | 1912 | 1913 | addFontTrait: 1914 | 1915 | 1916 | 1917 | 418 1918 | 1919 | 1920 | 1921 | addFontTrait: 1922 | 1923 | 1924 | 1925 | 419 1926 | 1927 | 1928 | 1929 | modifyFont: 1930 | 1931 | 1932 | 1933 | 420 1934 | 1935 | 1936 | 1937 | orderFrontFontPanel: 1938 | 1939 | 1940 | 1941 | 421 1942 | 1943 | 1944 | 1945 | modifyFont: 1946 | 1947 | 1948 | 1949 | 422 1950 | 1951 | 1952 | 1953 | 1954 | 1955 | 0 1956 | 1957 | 1958 | 1959 | 1960 | 1961 | -2 1962 | 1963 | 1964 | File's Owner 1965 | 1966 | 1967 | -1 1968 | 1969 | 1970 | First Responder 1971 | 1972 | 1973 | -3 1974 | 1975 | 1976 | Application 1977 | 1978 | 1979 | 29 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 19 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 56 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 103 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 83 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 81 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 75 2043 | 2044 | 2045 | 2046 | 2047 | 78 2048 | 2049 | 2050 | 2051 | 2052 | 72 2053 | 2054 | 2055 | 2056 | 2057 | 82 2058 | 2059 | 2060 | 2061 | 2062 | 124 2063 | 2064 | 2065 | 2066 | 2067 | 2068 | 2069 | 2070 | 77 2071 | 2072 | 2073 | 2074 | 2075 | 73 2076 | 2077 | 2078 | 2079 | 2080 | 79 2081 | 2082 | 2083 | 2084 | 2085 | 112 2086 | 2087 | 2088 | 2089 | 2090 | 74 2091 | 2092 | 2093 | 2094 | 2095 | 125 2096 | 2097 | 2098 | 2099 | 2100 | 2101 | 2102 | 2103 | 126 2104 | 2105 | 2106 | 2107 | 2108 | 106 2109 | 2110 | 2111 | 2112 | 2113 | 2114 | 2115 | 2116 | 111 2117 | 2118 | 2119 | 2120 | 2121 | 57 2122 | 2123 | 2124 | 2125 | 2126 | 2127 | 2128 | 2129 | 2130 | 2131 | 2132 | 2133 | 2134 | 2135 | 2136 | 2137 | 2138 | 2139 | 58 2140 | 2141 | 2142 | 2143 | 2144 | 134 2145 | 2146 | 2147 | 2148 | 2149 | 150 2150 | 2151 | 2152 | 2153 | 2154 | 136 2155 | 2156 | 2157 | 2158 | 2159 | 144 2160 | 2161 | 2162 | 2163 | 2164 | 129 2165 | 2166 | 2167 | 2168 | 2169 | 143 2170 | 2171 | 2172 | 2173 | 2174 | 236 2175 | 2176 | 2177 | 2178 | 2179 | 131 2180 | 2181 | 2182 | 2183 | 2184 | 2185 | 2186 | 2187 | 149 2188 | 2189 | 2190 | 2191 | 2192 | 145 2193 | 2194 | 2195 | 2196 | 2197 | 130 2198 | 2199 | 2200 | 2201 | 2202 | 24 2203 | 2204 | 2205 | 2206 | 2207 | 2208 | 2209 | 2210 | 2211 | 2212 | 2213 | 92 2214 | 2215 | 2216 | 2217 | 2218 | 5 2219 | 2220 | 2221 | 2222 | 2223 | 239 2224 | 2225 | 2226 | 2227 | 2228 | 23 2229 | 2230 | 2231 | 2232 | 2233 | 295 2234 | 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | 2241 | 296 2242 | 2243 | 2244 | 2245 | 2246 | 2247 | 2248 | 2249 | 2250 | 2251 | 2252 | 297 2253 | 2254 | 2255 | 2256 | 2257 | 298 2258 | 2259 | 2260 | 2261 | 2262 | 371 2263 | 2264 | 2265 | 2266 | 2267 | 373 2268 | 2269 | 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 374 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2282 | 2283 | 2284 | 375 2285 | 2286 | 2287 | 2288 | 2289 | 2290 | 2291 | 2292 | 376 2293 | 2294 | 2295 | 2296 | 2297 | 2298 | 2299 | 2300 | 377 2301 | 2302 | 2303 | 2304 | 2305 | 2306 | 2307 | 2308 | 2309 | 2310 | 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | 378 2318 | 2319 | 2320 | 2321 | 2322 | 379 2323 | 2324 | 2325 | 2326 | 2327 | 380 2328 | 2329 | 2330 | 2331 | 2332 | 381 2333 | 2334 | 2335 | 2336 | 2337 | 382 2338 | 2339 | 2340 | 2341 | 2342 | 383 2343 | 2344 | 2345 | 2346 | 2347 | 384 2348 | 2349 | 2350 | 2351 | 2352 | 385 2353 | 2354 | 2355 | 2356 | 2357 | 386 2358 | 2359 | 2360 | 2361 | 2362 | 2363 | 2364 | 2365 | 2366 | 2367 | 2368 | 2369 | 2370 | 2371 | 2372 | 2373 | 2374 | 2375 | 2376 | 2377 | 2378 | 2379 | 2380 | 387 2381 | 2382 | 2383 | 2384 | 2385 | 388 2386 | 2387 | 2388 | 2389 | 2390 | 389 2391 | 2392 | 2393 | 2394 | 2395 | 390 2396 | 2397 | 2398 | 2399 | 2400 | 391 2401 | 2402 | 2403 | 2404 | 2405 | 392 2406 | 2407 | 2408 | 2409 | 2410 | 393 2411 | 2412 | 2413 | 2414 | 2415 | 394 2416 | 2417 | 2418 | 2419 | 2420 | 395 2421 | 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 2428 | 396 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 2435 | 2436 | 397 2437 | 2438 | 2439 | 2440 | 2441 | 2442 | 2443 | 2444 | 398 2445 | 2446 | 2447 | 2448 | 2449 | 399 2450 | 2451 | 2452 | 2453 | 2454 | 400 2455 | 2456 | 2457 | 2458 | 2459 | 401 2460 | 2461 | 2462 | 2463 | 2464 | 402 2465 | 2466 | 2467 | 2468 | 2469 | 403 2470 | 2471 | 2472 | 2473 | 2474 | 2475 | 2476 | 2477 | 2478 | 2479 | 2480 | 2481 | 404 2482 | 2483 | 2484 | 2485 | 2486 | 405 2487 | 2488 | 2489 | 2490 | 2491 | 406 2492 | 2493 | 2494 | 2495 | 2496 | 407 2497 | 2498 | 2499 | 2500 | 2501 | 408 2502 | 2503 | 2504 | 2505 | 2506 | 409 2507 | 2508 | 2509 | 2510 | 2511 | 2512 | 2513 | 2514 | 2515 | 2516 | 410 2517 | 2518 | 2519 | 2520 | 2521 | 411 2522 | 2523 | 2524 | 2525 | 2526 | 412 2527 | 2528 | 2529 | 2530 | 2531 | 413 2532 | 2533 | 2534 | 2535 | 2536 | 2537 | 2538 | 2539 | 2540 | 2541 | 2542 | 414 2543 | 2544 | 2545 | 2546 | 2547 | 415 2548 | 2549 | 2550 | 2551 | 2552 | 416 2553 | 2554 | 2555 | 2556 | 2557 | 417 2558 | 2559 | 2560 | 2561 | 2562 | 681 2563 | 2564 | 2565 | 2566 | 2567 | 2568 | 2569 | 2570 | 682 2571 | 2572 | 2573 | 2574 | 2575 | 2576 | 2577 | 2578 | 2579 | 2580 | 2581 | 2582 | 2583 | 2584 | 2585 | 2586 | 2587 | 2588 | 2589 | 2590 | 2591 | 2592 | 683 2593 | 2594 | 2595 | 2596 | 2597 | 684 2598 | 2599 | 2600 | 2601 | 2602 | 685 2603 | 2604 | 2605 | 2606 | 2607 | 686 2608 | 2609 | 2610 | 2611 | 2612 | 687 2613 | 2614 | 2615 | 2616 | 2617 | 688 2618 | 2619 | 2620 | 2621 | 2622 | 689 2623 | 2624 | 2625 | 2626 | 2627 | 690 2628 | 2629 | 2630 | 2631 | 2632 | 691 2633 | 2634 | 2635 | 2636 | 2637 | 692 2638 | 2639 | 2640 | 2641 | 2642 | 693 2643 | 2644 | 2645 | 2646 | 2647 | 2648 | 2649 | 2650 | 694 2651 | 2652 | 2653 | 2654 | 2655 | 2656 | 2657 | 2658 | 695 2659 | 2660 | 2661 | 2662 | 2663 | 2664 | 2665 | 2666 | 696 2667 | 2668 | 2669 | 2670 | 2671 | 2672 | 2673 | 2674 | 697 2675 | 2676 | 2677 | 2678 | 2679 | 2680 | 2681 | 2682 | 708 2683 | 2684 | 2685 | 2686 | 2687 | 2688 | 2689 | 2690 | 2691 | 709 2692 | 2693 | 2694 | 2695 | 2696 | 710 2697 | 2698 | 2699 | 2700 | 2701 | 711 2702 | 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 2709 | 2710 | 2711 | 712 2712 | 2713 | 2714 | 2715 | 2716 | 713 2717 | 2718 | 2719 | 2720 | 2721 | 714 2722 | 2723 | 2724 | 2725 | 2726 | 715 2727 | 2728 | 2729 | 2730 | 2731 | 2732 | 2733 | 2734 | 2735 | 2736 | 2737 | 2738 | 2739 | 2740 | 2741 | 716 2742 | 2743 | 2744 | 2745 | 2746 | 717 2747 | 2748 | 2749 | 2750 | 2751 | 718 2752 | 2753 | 2754 | 2755 | 2756 | 719 2757 | 2758 | 2759 | 2760 | 2761 | 720 2762 | 2763 | 2764 | 2765 | 2766 | 721 2767 | 2768 | 2769 | 2770 | 2771 | 722 2772 | 2773 | 2774 | 2775 | 2776 | 723 2777 | 2778 | 2779 | 2780 | 2781 | 724 2782 | 2783 | 2784 | 2785 | 2786 | 2787 | 2788 | 2789 | 2790 | 2791 | 2792 | 2793 | 2794 | 725 2795 | 2796 | 2797 | 2798 | 2799 | 726 2800 | 2801 | 2802 | 2803 | 2804 | 727 2805 | 2806 | 2807 | 2808 | 2809 | 728 2810 | 2811 | 2812 | 2813 | 2814 | 729 2815 | 2816 | 2817 | 2818 | 2819 | 730 2820 | 2821 | 2822 | 2823 | 2824 | 731 2825 | 2826 | 2827 | 2828 | 2829 | 2830 | 2831 | 2832 | 2833 | 2834 | 2835 | 2836 | 2837 | 732 2838 | 2839 | 2840 | 2841 | 2842 | 733 2843 | 2844 | 2845 | 2846 | 2847 | 734 2848 | 2849 | 2850 | 2851 | 2852 | 735 2853 | 2854 | 2855 | 2856 | 2857 | 736 2858 | 2859 | 2860 | 2861 | 2862 | 773 2863 | 2864 | 2865 | 2866 | 2867 | 774 2868 | 2869 | 2870 | 2871 | 2872 | 2873 | 2874 | 2875 | 775 2876 | 2877 | 2878 | 2879 | 2880 | 2881 | 2882 | 2883 | 2884 | 2885 | 2886 | 2887 | 2888 | 2889 | 2890 | 2891 | 776 2892 | 2893 | 2894 | 2895 | 2896 | 777 2897 | 2898 | 2899 | 2900 | 2901 | 778 2902 | 2903 | 2904 | 2905 | 2906 | 779 2907 | 2908 | 2909 | 2910 | 2911 | 780 2912 | 2913 | 2914 | 2915 | 2916 | 781 2917 | 2918 | 2919 | 2920 | 2921 | 782 2922 | 2923 | 2924 | 2925 | 2926 | 783 2927 | 2928 | 2929 | 2930 | 2931 | 784 2932 | 2933 | 2934 | 2935 | 2936 | 791 2937 | 2938 | 2939 | 2940 | 2941 | 798 2942 | 2943 | 2944 | 2945 | 2946 | 799 2947 | 2948 | 2949 | 2950 | 2951 | 2952 | 2953 | com.apple.InterfaceBuilder.CocoaPlugin 2954 | com.apple.InterfaceBuilder.CocoaPlugin 2955 | com.apple.InterfaceBuilder.CocoaPlugin 2956 | com.apple.InterfaceBuilder.CocoaPlugin 2957 | com.apple.InterfaceBuilder.CocoaPlugin 2958 | com.apple.InterfaceBuilder.CocoaPlugin 2959 | com.apple.InterfaceBuilder.CocoaPlugin 2960 | com.apple.InterfaceBuilder.CocoaPlugin 2961 | com.apple.InterfaceBuilder.CocoaPlugin 2962 | com.apple.InterfaceBuilder.CocoaPlugin 2963 | com.apple.InterfaceBuilder.CocoaPlugin 2964 | com.apple.InterfaceBuilder.CocoaPlugin 2965 | com.apple.InterfaceBuilder.CocoaPlugin 2966 | com.apple.InterfaceBuilder.CocoaPlugin 2967 | com.apple.InterfaceBuilder.CocoaPlugin 2968 | com.apple.InterfaceBuilder.CocoaPlugin 2969 | com.apple.InterfaceBuilder.CocoaPlugin 2970 | com.apple.InterfaceBuilder.CocoaPlugin 2971 | com.apple.InterfaceBuilder.CocoaPlugin 2972 | com.apple.InterfaceBuilder.CocoaPlugin 2973 | com.apple.InterfaceBuilder.CocoaPlugin 2974 | com.apple.InterfaceBuilder.CocoaPlugin 2975 | com.apple.InterfaceBuilder.CocoaPlugin 2976 | com.apple.InterfaceBuilder.CocoaPlugin 2977 | com.apple.InterfaceBuilder.CocoaPlugin 2978 | com.apple.InterfaceBuilder.CocoaPlugin 2979 | com.apple.InterfaceBuilder.CocoaPlugin 2980 | com.apple.InterfaceBuilder.CocoaPlugin 2981 | com.apple.InterfaceBuilder.CocoaPlugin 2982 | com.apple.InterfaceBuilder.CocoaPlugin 2983 | com.apple.InterfaceBuilder.CocoaPlugin 2984 | com.apple.InterfaceBuilder.CocoaPlugin 2985 | com.apple.InterfaceBuilder.CocoaPlugin 2986 | com.apple.InterfaceBuilder.CocoaPlugin 2987 | com.apple.InterfaceBuilder.CocoaPlugin 2988 | com.apple.InterfaceBuilder.CocoaPlugin 2989 | com.apple.InterfaceBuilder.CocoaPlugin 2990 | com.apple.InterfaceBuilder.CocoaPlugin 2991 | com.apple.InterfaceBuilder.CocoaPlugin 2992 | com.apple.InterfaceBuilder.CocoaPlugin 2993 | com.apple.InterfaceBuilder.CocoaPlugin 2994 | com.apple.InterfaceBuilder.CocoaPlugin 2995 | com.apple.InterfaceBuilder.CocoaPlugin 2996 | com.apple.InterfaceBuilder.CocoaPlugin 2997 | com.apple.InterfaceBuilder.CocoaPlugin 2998 | com.apple.InterfaceBuilder.CocoaPlugin 2999 | com.apple.InterfaceBuilder.CocoaPlugin 3000 | com.apple.InterfaceBuilder.CocoaPlugin 3001 | com.apple.InterfaceBuilder.CocoaPlugin 3002 | com.apple.InterfaceBuilder.CocoaPlugin 3003 | com.apple.InterfaceBuilder.CocoaPlugin 3004 | com.apple.InterfaceBuilder.CocoaPlugin 3005 | com.apple.InterfaceBuilder.CocoaPlugin 3006 | com.apple.InterfaceBuilder.CocoaPlugin 3007 | com.apple.InterfaceBuilder.CocoaPlugin 3008 | com.apple.InterfaceBuilder.CocoaPlugin 3009 | com.apple.InterfaceBuilder.CocoaPlugin 3010 | com.apple.InterfaceBuilder.CocoaPlugin 3011 | com.apple.InterfaceBuilder.CocoaPlugin 3012 | com.apple.InterfaceBuilder.CocoaPlugin 3013 | com.apple.InterfaceBuilder.CocoaPlugin 3014 | com.apple.InterfaceBuilder.CocoaPlugin 3015 | com.apple.InterfaceBuilder.CocoaPlugin 3016 | com.apple.InterfaceBuilder.CocoaPlugin 3017 | com.apple.InterfaceBuilder.CocoaPlugin 3018 | com.apple.InterfaceBuilder.CocoaPlugin 3019 | com.apple.InterfaceBuilder.CocoaPlugin 3020 | com.apple.InterfaceBuilder.CocoaPlugin 3021 | com.apple.InterfaceBuilder.CocoaPlugin 3022 | com.apple.InterfaceBuilder.CocoaPlugin 3023 | com.apple.InterfaceBuilder.CocoaPlugin 3024 | com.apple.InterfaceBuilder.CocoaPlugin 3025 | com.apple.InterfaceBuilder.CocoaPlugin 3026 | com.apple.InterfaceBuilder.CocoaPlugin 3027 | com.apple.InterfaceBuilder.CocoaPlugin 3028 | com.apple.InterfaceBuilder.CocoaPlugin 3029 | com.apple.InterfaceBuilder.CocoaPlugin 3030 | com.apple.InterfaceBuilder.CocoaPlugin 3031 | com.apple.InterfaceBuilder.CocoaPlugin 3032 | com.apple.InterfaceBuilder.CocoaPlugin 3033 | com.apple.InterfaceBuilder.CocoaPlugin 3034 | com.apple.InterfaceBuilder.CocoaPlugin 3035 | com.apple.InterfaceBuilder.CocoaPlugin 3036 | com.apple.InterfaceBuilder.CocoaPlugin 3037 | com.apple.InterfaceBuilder.CocoaPlugin 3038 | com.apple.InterfaceBuilder.CocoaPlugin 3039 | com.apple.InterfaceBuilder.CocoaPlugin 3040 | com.apple.InterfaceBuilder.CocoaPlugin 3041 | com.apple.InterfaceBuilder.CocoaPlugin 3042 | com.apple.InterfaceBuilder.CocoaPlugin 3043 | com.apple.InterfaceBuilder.CocoaPlugin 3044 | com.apple.InterfaceBuilder.CocoaPlugin 3045 | com.apple.InterfaceBuilder.CocoaPlugin 3046 | com.apple.InterfaceBuilder.CocoaPlugin 3047 | com.apple.InterfaceBuilder.CocoaPlugin 3048 | com.apple.InterfaceBuilder.CocoaPlugin 3049 | com.apple.InterfaceBuilder.CocoaPlugin 3050 | com.apple.InterfaceBuilder.CocoaPlugin 3051 | com.apple.InterfaceBuilder.CocoaPlugin 3052 | com.apple.InterfaceBuilder.CocoaPlugin 3053 | com.apple.InterfaceBuilder.CocoaPlugin 3054 | com.apple.InterfaceBuilder.CocoaPlugin 3055 | com.apple.InterfaceBuilder.CocoaPlugin 3056 | com.apple.InterfaceBuilder.CocoaPlugin 3057 | com.apple.InterfaceBuilder.CocoaPlugin 3058 | com.apple.InterfaceBuilder.CocoaPlugin 3059 | com.apple.InterfaceBuilder.CocoaPlugin 3060 | com.apple.InterfaceBuilder.CocoaPlugin 3061 | com.apple.InterfaceBuilder.CocoaPlugin 3062 | com.apple.InterfaceBuilder.CocoaPlugin 3063 | com.apple.InterfaceBuilder.CocoaPlugin 3064 | com.apple.InterfaceBuilder.CocoaPlugin 3065 | com.apple.InterfaceBuilder.CocoaPlugin 3066 | com.apple.InterfaceBuilder.CocoaPlugin 3067 | com.apple.InterfaceBuilder.CocoaPlugin 3068 | com.apple.InterfaceBuilder.CocoaPlugin 3069 | com.apple.InterfaceBuilder.CocoaPlugin 3070 | com.apple.InterfaceBuilder.CocoaPlugin 3071 | com.apple.InterfaceBuilder.CocoaPlugin 3072 | com.apple.InterfaceBuilder.CocoaPlugin 3073 | com.apple.InterfaceBuilder.CocoaPlugin 3074 | com.apple.InterfaceBuilder.CocoaPlugin 3075 | com.apple.InterfaceBuilder.CocoaPlugin 3076 | com.apple.InterfaceBuilder.CocoaPlugin 3077 | com.apple.InterfaceBuilder.CocoaPlugin 3078 | com.apple.InterfaceBuilder.CocoaPlugin 3079 | com.apple.InterfaceBuilder.CocoaPlugin 3080 | com.apple.InterfaceBuilder.CocoaPlugin 3081 | com.apple.InterfaceBuilder.CocoaPlugin 3082 | com.apple.InterfaceBuilder.CocoaPlugin 3083 | com.apple.InterfaceBuilder.CocoaPlugin 3084 | com.apple.InterfaceBuilder.CocoaPlugin 3085 | com.apple.InterfaceBuilder.CocoaPlugin 3086 | com.apple.InterfaceBuilder.CocoaPlugin 3087 | com.apple.InterfaceBuilder.CocoaPlugin 3088 | com.apple.InterfaceBuilder.CocoaPlugin 3089 | com.apple.InterfaceBuilder.CocoaPlugin 3090 | com.apple.InterfaceBuilder.CocoaPlugin 3091 | com.apple.InterfaceBuilder.CocoaPlugin 3092 | com.apple.InterfaceBuilder.CocoaPlugin 3093 | com.apple.InterfaceBuilder.CocoaPlugin 3094 | com.apple.InterfaceBuilder.CocoaPlugin 3095 | com.apple.InterfaceBuilder.CocoaPlugin 3096 | com.apple.InterfaceBuilder.CocoaPlugin 3097 | com.apple.InterfaceBuilder.CocoaPlugin 3098 | com.apple.InterfaceBuilder.CocoaPlugin 3099 | com.apple.InterfaceBuilder.CocoaPlugin 3100 | com.apple.InterfaceBuilder.CocoaPlugin 3101 | com.apple.InterfaceBuilder.CocoaPlugin 3102 | com.apple.InterfaceBuilder.CocoaPlugin 3103 | com.apple.InterfaceBuilder.CocoaPlugin 3104 | com.apple.InterfaceBuilder.CocoaPlugin 3105 | 3106 | 3107 | 3108 | 3109 | 3110 | 801 3111 | 3112 | 3113 | 3114 | 3115 | FirstResponder 3116 | 3117 | showDevTools: 3118 | id 3119 | 3120 | 3121 | showDevTools: 3122 | 3123 | showDevTools: 3124 | id 3125 | 3126 | 3127 | 3128 | IBUserSource 3129 | 3130 | 3131 | 3132 | 3133 | 3134 | 0 3135 | IBCocoaFramework 3136 | 3137 | com.apple.InterfaceBuilder.CocoaPlugin.macosx 3138 | 3139 | 3140 | YES 3141 | 3 3142 | 3143 | {11, 11} 3144 | {10, 3} 3145 | 3146 | YES 3147 | 3148 | 3149 | -------------------------------------------------------------------------------- /browser/mac/WindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1080 5 | 12D78 6 | 3084 7 | 1187.37 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.CocoaPlugin 11 | 3084 12 | 13 | 14 | NSCustomObject 15 | NSView 16 | NSWindowTemplate 17 | 18 | 19 | com.apple.InterfaceBuilder.CocoaPlugin 20 | 21 | 22 | PluginDependencyRecalculationVersion 23 | 24 | 25 | 26 | 27 | WindowController 28 | 29 | 30 | FirstResponder 31 | 32 | 33 | NSApplication 34 | 35 | 36 | 15 37 | 2 38 | {{196, 240}, {480, 270}} 39 | 544735232 40 | Brightray Example 41 | UnderlayOpenGLHostingWindow 42 | 43 | 44 | 45 | 46 | 256 47 | {480, 270} 48 | 49 | 50 | 51 | 52 | {{0, 0}, {2560, 1418}} 53 | {10000000000000, 10000000000000} 54 | YES 55 | 56 | 57 | 58 | 59 | 60 | 61 | window 62 | 63 | 64 | 65 | 3 66 | 67 | 68 | 69 | 70 | 71 | 0 72 | 73 | 74 | 75 | 76 | 77 | -2 78 | 79 | 80 | File's Owner 81 | 82 | 83 | -1 84 | 85 | 86 | First Responder 87 | 88 | 89 | -3 90 | 91 | 92 | Application 93 | 94 | 95 | 1 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 2 104 | 105 | 106 | 107 | 108 | 109 | 110 | com.apple.InterfaceBuilder.CocoaPlugin 111 | com.apple.InterfaceBuilder.CocoaPlugin 112 | com.apple.InterfaceBuilder.CocoaPlugin 113 | com.apple.InterfaceBuilder.CocoaPlugin 114 | {{357, 418}, {480, 270}} 115 | 116 | com.apple.InterfaceBuilder.CocoaPlugin 117 | 118 | 119 | 120 | 121 | 122 | 3 123 | 124 | 125 | 126 | 127 | WindowController 128 | NSWindowController 129 | 130 | IBProjectSource 131 | ./Classes/WindowController.h 132 | 133 | 134 | 135 | 136 | 0 137 | IBCocoaFramework 138 | YES 139 | 3 140 | YES 141 | 142 | 143 | -------------------------------------------------------------------------------- /browser/mac/window_controller.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_MAC_WINDOW_CONTROLLER_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_MAC_WINDOW_CONTROLLER_H_ 3 | 4 | #import "base/memory/scoped_ptr.h" 5 | #import 6 | 7 | namespace brightray { 8 | class BrowserContext; 9 | } 10 | 11 | namespace brightray_example { 12 | class WindowMac; 13 | } 14 | 15 | @interface WindowController : NSWindowController { 16 | @private 17 | scoped_ptr wrapper_window_; 18 | } 19 | 20 | @property (nonatomic, readonly, assign) brightray_example::WindowMac* wrapperWindow; 21 | 22 | - (instancetype)initWithBrowserContext:(brightray::BrowserContext*)browserContext; 23 | 24 | @end 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /browser/mac/window_controller.mm: -------------------------------------------------------------------------------- 1 | #import "browser/mac/window_controller.h" 2 | 3 | #import "browser/mac/window_mac.h" 4 | 5 | #import "brightray/browser/inspectable_web_contents.h" 6 | #import "brightray/browser/inspectable_web_contents_view.h" 7 | 8 | @implementation WindowController 9 | 10 | - (instancetype)initWithBrowserContext:(brightray::BrowserContext *)browserContext { 11 | self = [super initWithWindowNibName:@"WindowController"]; 12 | if (!self) 13 | return nil; 14 | 15 | wrapper_window_.reset(new brightray_example::WindowMac(browserContext, self)); 16 | 17 | return self; 18 | } 19 | 20 | - (void)windowDidLoad { 21 | [super windowDidLoad]; 22 | 23 | auto contentsView = self.wrapperWindow->inspectable_web_contents()->GetView()->GetNativeView(); 24 | 25 | contentsView.frame = [self.window.contentView bounds]; 26 | contentsView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; 27 | 28 | [self.window.contentView addSubview:contentsView]; 29 | 30 | self.wrapperWindow->WindowReady(); 31 | } 32 | 33 | - (brightray_example::WindowMac*)wrapperWindow { 34 | return wrapper_window_.get(); 35 | } 36 | 37 | - (void)windowWillClose:(NSNotification *)notification { 38 | [self performSelector:@selector(autorelease) withObject:nil afterDelay:0]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /browser/mac/window_mac.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_MAC_WINDOW_MAC_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_MAC_WINDOW_MAC_H_ 3 | 4 | #include "browser/window.h" 5 | 6 | @class WindowController; 7 | 8 | namespace brightray_example { 9 | 10 | class WindowMac : public Window { 11 | public: 12 | WindowMac(brightray::BrowserContext*, WindowController*); 13 | ~WindowMac(); 14 | 15 | void Show() override; 16 | 17 | private: 18 | // Owns us. 19 | WindowController* controller_; 20 | 21 | DISALLOW_COPY_AND_ASSIGN(WindowMac); 22 | }; 23 | 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /browser/mac/window_mac.mm: -------------------------------------------------------------------------------- 1 | #import "browser/mac/window_mac.h" 2 | 3 | #import "browser/mac/window_controller.h" 4 | 5 | namespace brightray_example { 6 | 7 | Window* Window::Create(brightray::BrowserContext* browser_context) { 8 | // controller will clean itself up when its window is closed, but the static analyzer doesn't know 9 | // that. 10 | #ifndef __clang_analyzer__ 11 | auto controller = [[WindowController alloc] initWithBrowserContext:browser_context]; 12 | return controller.wrapperWindow; 13 | #endif 14 | } 15 | 16 | WindowMac::WindowMac(brightray::BrowserContext* browser_context, WindowController* controller) 17 | : Window(browser_context), 18 | controller_(controller) { 19 | } 20 | 21 | WindowMac::~WindowMac() { 22 | } 23 | 24 | void WindowMac::Show() { 25 | // -showWindow: can call -autorelease, so we'd better have a pool in place. 26 | @autoreleasepool { 27 | [controller_ showWindow:nil]; 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /browser/views/window_views.cc: -------------------------------------------------------------------------------- 1 | #include "browser/views/window_views.h" 2 | 3 | #include "brightray/browser/inspectable_web_contents.h" 4 | #include "brightray/browser/inspectable_web_contents_view.h" 5 | 6 | #include "ui/views/layout/fill_layout.h" 7 | #include "ui/views/widget/widget.h" 8 | #include "ui/views/widget/widget_delegate.h" 9 | 10 | #include "base/strings/utf_string_conversions.h" 11 | 12 | namespace brightray_example { 13 | 14 | namespace { 15 | 16 | class WidgetDelegateView : public views::WidgetDelegateView { 17 | public: 18 | WidgetDelegateView(scoped_ptr window) 19 | : window_(window.Pass()) { 20 | SetLayoutManager(new views::FillLayout); 21 | } 22 | ~WidgetDelegateView() { 23 | } 24 | 25 | void DeleteDelegate() override { delete this; } 26 | views::View* GetContentsView() override { return this; } 27 | bool CanResize() const override { return true; } 28 | bool CanMaximize() const override { return true; } 29 | base::string16 GetWindowTitle() const override { 30 | return base::ASCIIToUTF16("Brightray Example"); 31 | } 32 | gfx::Size GetPreferredSize() const override { return gfx::Size(800, 600); } 33 | gfx::Size GetMinimumSize() const override { return gfx::Size(100, 100); } 34 | 35 | private: 36 | scoped_ptr window_; 37 | 38 | DISALLOW_COPY_AND_ASSIGN(WidgetDelegateView); 39 | }; 40 | 41 | } 42 | 43 | Window* Window::Create(brightray::BrowserContext* browser_context) { 44 | return new WindowViews(browser_context); 45 | } 46 | 47 | WindowViews::WindowViews(brightray::BrowserContext* browser_context) 48 | : Window(browser_context), 49 | widget_(new views::Widget) { 50 | auto delegate_view = new WidgetDelegateView(make_scoped_ptr(this).Pass()); 51 | 52 | views::Widget::InitParams params; 53 | params.delegate = delegate_view; 54 | widget_->Init(params); 55 | delegate_view->AddChildView(inspectable_web_contents()->GetView()->GetView()); 56 | delegate_view->Layout(); 57 | WindowReady(); 58 | } 59 | 60 | WindowViews::~WindowViews() { 61 | } 62 | 63 | void WindowViews::Show() { 64 | widget_->Show(); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /browser/views/window_views.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_VIEWS_WINDOW_VIEWS_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_VIEWS_WINDOW_VIEWS_H_ 3 | 4 | #include "browser/window.h" 5 | 6 | namespace views { 7 | class Widget; 8 | } 9 | 10 | namespace brightray_example { 11 | 12 | class WindowViews : public Window { 13 | public: 14 | WindowViews(brightray::BrowserContext*); 15 | ~WindowViews(); 16 | 17 | void Show() override; 18 | 19 | private: 20 | views::Widget* widget_; 21 | 22 | DISALLOW_COPY_AND_ASSIGN(WindowViews); 23 | }; 24 | 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /browser/window.cc: -------------------------------------------------------------------------------- 1 | #include "browser/window.h" 2 | 3 | #include "brightray/browser/browser_context.h" 4 | #include "brightray/browser/default_web_contents_delegate.h" 5 | #include "brightray/browser/inspectable_web_contents.h" 6 | 7 | namespace brightray_example { 8 | 9 | Window::Window(brightray::BrowserContext* browser_context) 10 | : browser_context_(browser_context), 11 | inspectable_web_contents_(brightray::InspectableWebContents::Create(content::WebContents::CreateParams(browser_context))), 12 | web_contents_delegate_(new brightray::DefaultWebContentsDelegate) { 13 | auto web_contents = inspectable_web_contents_->GetWebContents(); 14 | web_contents->SetDelegate(web_contents_delegate_.get()); 15 | } 16 | 17 | Window::~Window() { 18 | } 19 | 20 | void Window::WindowReady() { 21 | auto web_contents = inspectable_web_contents_->GetWebContents(); 22 | web_contents->GetController().LoadURL(GURL("http://adam.roben.org/brightray_example/start.html"), content::Referrer(), ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); 23 | web_contents->SetInitialFocus(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /browser/window.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_BROWSER_WINDOW_H_ 2 | #define BRIGHTRAY_EXAMPLE_BROWSER_WINDOW_H_ 3 | 4 | #include "base/basictypes.h" 5 | #include "base/memory/scoped_ptr.h" 6 | 7 | namespace brightray { 8 | class BrowserContext; 9 | class DefaultWebContentsDelegate; 10 | class InspectableWebContents; 11 | } 12 | 13 | namespace brightray_example { 14 | 15 | class Window { 16 | public: 17 | static Window* Create(brightray::BrowserContext*); 18 | 19 | brightray::BrowserContext* browser_context() { return browser_context_; } 20 | brightray::InspectableWebContents* inspectable_web_contents() { return inspectable_web_contents_.get(); } 21 | 22 | void WindowReady(); 23 | virtual void Show() = 0; 24 | 25 | protected: 26 | Window(brightray::BrowserContext*); 27 | virtual ~Window(); 28 | 29 | private: 30 | brightray::BrowserContext* browser_context_; 31 | scoped_ptr inspectable_web_contents_; 32 | scoped_ptr web_contents_delegate_; 33 | 34 | DISALLOW_COPY_AND_ASSIGN(Window); 35 | }; 36 | 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /common/library_main.cc: -------------------------------------------------------------------------------- 1 | #include "common/library_main.h" 2 | 3 | #include "common/main_delegate.h" 4 | #include "content/public/app/content_main.h" 5 | 6 | int BrightrayExampleMain(int argc, const char* argv[]) { 7 | brightray_example::MainDelegate delegate; 8 | content::ContentMainParams params(&delegate); 9 | params.argc = argc; 10 | params.argv = argv; 11 | return content::ContentMain(params); 12 | } 13 | -------------------------------------------------------------------------------- /common/library_main.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_COMMON_LIBRARY_MAIN_H_ 2 | #define BRIGHTRAY_EXAMPLE_COMMON_LIBRARY_MAIN_H_ 3 | 4 | #include "build/build_config.h" 5 | 6 | extern "C" { 7 | 8 | #if defined(OS_MACOSX) 9 | __attribute__ ((visibility ("default"))) 10 | int BrightrayExampleMain(int argc, const char* argv[]); 11 | #endif 12 | 13 | } 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /common/main.cc: -------------------------------------------------------------------------------- 1 | #include "common/library_main.h" 2 | #include "common/main_delegate.h" 3 | 4 | #include "content/public/app/content_main.h" 5 | #include "sandbox/win/src/sandbox_types.h" 6 | 7 | #if defined(OS_WIN) 8 | 9 | #include "content/public/app/startup_helper_win.h" 10 | #include 11 | 12 | int WINAPI wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { 13 | sandbox::SandboxInterfaceInfo sandbox_info = {0}; 14 | content::InitializeSandboxInfo(&sandbox_info); 15 | brightray_example::MainDelegate delegate; 16 | 17 | content::ContentMainParams params(&delegate); 18 | params.instance = instance; 19 | params.sandbox_info = &sandbox_info; 20 | return content::ContentMain(params); 21 | } 22 | 23 | #elif defined(OS_MACOSX) 24 | 25 | int main(int argc, const char* argv[]) { 26 | return BrightrayExampleMain(argc, argv); 27 | } 28 | 29 | #else // OS_LINUX 30 | 31 | int main(int argc, const char* argv[]) { 32 | brightray_example::MainDelegate delegate; 33 | content::ContentMainParams params(&delegate); 34 | params.argc = argc; 35 | params.argv = argv; 36 | return content::ContentMain(params); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /common/main_delegate.cc: -------------------------------------------------------------------------------- 1 | #include "common/main_delegate.h" 2 | 3 | #include "browser/browser_client.h" 4 | #include "renderer/renderer_client.h" 5 | 6 | namespace brightray_example { 7 | 8 | MainDelegate::MainDelegate() { 9 | } 10 | 11 | MainDelegate::~MainDelegate() { 12 | } 13 | 14 | content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() { 15 | browser_client_.reset(new BrowserClient); 16 | return browser_client_.get(); 17 | } 18 | 19 | content::ContentRendererClient* MainDelegate::CreateContentRendererClient() { 20 | renderer_client_.reset(new RendererClient); 21 | return renderer_client_.get(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /common/main_delegate.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_COMMON_MAIN_DELEGATE_H_ 2 | #define BRIGHTRAY_EXAMPLE_COMMON_MAIN_DELEGATE_H_ 3 | 4 | #include "brightray/common/main_delegate.h" 5 | 6 | namespace brightray_example { 7 | 8 | class MainDelegate : public brightray::MainDelegate { 9 | public: 10 | MainDelegate(); 11 | ~MainDelegate(); 12 | 13 | private: 14 | content::ContentBrowserClient* CreateContentBrowserClient() override; 15 | content::ContentRendererClient* CreateContentRendererClient() override; 16 | 17 | scoped_ptr browser_client_; 18 | scoped_ptr renderer_client_; 19 | 20 | DISALLOW_COPY_AND_ASSIGN(MainDelegate); 21 | }; 22 | 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /renderer/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | org.roben.brightray.example.helper 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | LSUIElement 10 | 11 | NSSupportsAutomaticGraphicsSwitching 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /renderer/render_view_observer.cc: -------------------------------------------------------------------------------- 1 | #include "renderer/render_view_observer.h" 2 | 3 | #include "base/strings/stringprintf.h" 4 | #include "base/strings/string_util.h" 5 | #include "third_party/WebKit/public/web/WebDocument.h" 6 | #include "third_party/WebKit/public/web/WebLocalFrame.h" 7 | #include "v8/include/v8.h" 8 | 9 | namespace brightray_example { 10 | 11 | namespace { 12 | 13 | void HelloWorld(v8::Local property, const v8::PropertyCallbackInfo& info) { 14 | info.GetReturnValue().Set(v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), base::StringPrintf("Hello, World from %s:%d!", __FILE__, __LINE__).c_str())); 15 | } 16 | 17 | v8::Local CreateConstructorTemplate() { 18 | auto constructor_template = v8::ObjectTemplate::New(); 19 | constructor_template->SetAccessor(v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), "helloWorld"), HelloWorld); 20 | return constructor_template; 21 | } 22 | 23 | 24 | v8::Local ConstructorTemplate() { 25 | auto isolate = v8::Isolate::GetCurrent(); 26 | static v8::Persistent constructor_template(isolate, CreateConstructorTemplate()); 27 | return v8::Local::New(isolate, constructor_template); 28 | } 29 | 30 | } 31 | 32 | RenderViewObserver::RenderViewObserver(content::RenderView *render_view) 33 | : content::RenderViewObserver(render_view) { 34 | } 35 | 36 | RenderViewObserver::~RenderViewObserver() { 37 | } 38 | 39 | void RenderViewObserver::DidClearWindowObject(blink::WebLocalFrame* frame) { 40 | GURL url = frame->document().url(); 41 | if (!url.SchemeIs("http") || 42 | !url.DomainIs("adam.roben.org") || 43 | !StartsWithASCII(url.path(), "/brightray_example/", true)) 44 | return; 45 | 46 | v8::HandleScope scope(v8::Isolate::GetCurrent()); 47 | 48 | auto context = frame->mainWorldScriptContext(); 49 | v8::Context::Scope contextScope(context); 50 | 51 | context->Global()->Set(v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), "brightray_example"), ConstructorTemplate()->NewInstance()); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /renderer/render_view_observer.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_RENDERER_RENDER_VIEW_OBSERVER_H_ 2 | #define BRIGHTRAY_EXAMPLE_RENDERER_RENDER_VIEW_OBSERVER_H_ 3 | 4 | #include "content/public/renderer/render_view_observer.h" 5 | 6 | namespace brightray_example { 7 | 8 | class RenderViewObserver : content::RenderViewObserver { 9 | public: 10 | explicit RenderViewObserver(content::RenderView*); 11 | private: 12 | ~RenderViewObserver(); 13 | 14 | void DidClearWindowObject(blink::WebLocalFrame* frame) override; 15 | }; 16 | 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /renderer/renderer_client.cc: -------------------------------------------------------------------------------- 1 | #include "renderer/renderer_client.h" 2 | 3 | #include "renderer/render_view_observer.h" 4 | 5 | namespace brightray_example { 6 | 7 | RendererClient::RendererClient() { 8 | } 9 | 10 | RendererClient::~RendererClient() { 11 | } 12 | 13 | void RendererClient::RenderViewCreated(content::RenderView* render_view) { 14 | auto observer = new RenderViewObserver(render_view); 15 | // observer will be deleted automatically when render_view is destroyed. 16 | (void)observer; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /renderer/renderer_client.h: -------------------------------------------------------------------------------- 1 | #ifndef BRIGHTRAY_EXAMPLE_RENDERER_RENDERER_CLIENT_H_ 2 | #define BRIGHTRAY_EXAMPLE_RENDERER_RENDERER_CLIENT_H_ 3 | 4 | #include "content/public/renderer/content_renderer_client.h" 5 | 6 | namespace brightray_example { 7 | 8 | class RendererClient : public content::ContentRendererClient { 9 | public: 10 | RendererClient(); 11 | ~RendererClient(); 12 | 13 | private: 14 | void RenderViewCreated(content::RenderView*) override; 15 | 16 | DISALLOW_COPY_AND_ASSIGN(RendererClient); 17 | }; 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import argparse 4 | import errno 5 | import os 6 | import subprocess 7 | import sys 8 | 9 | 10 | SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 11 | VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor') 12 | 13 | 14 | def main(): 15 | args = parse_args() 16 | update_submodules() 17 | bootstrap_brightray(args.commit, args.url) 18 | 19 | 20 | def parse_args(): 21 | parser = argparse.ArgumentParser(description='Bootstrap this project') 22 | parser.add_argument('-c', '--commit', nargs='?', default='HEAD', 23 | help='The commit of libchromiumcontent to download.') 24 | parser.add_argument('url', help='The base URL from which to download ' 25 | 'libchromiumcontent (i.e., the URL you passed to ' 26 | 'libchromiumcontent\'s script/upload script') 27 | return parser.parse_args() 28 | 29 | 30 | def update_submodules(): 31 | cwd = os.getcwd() 32 | os.chdir(SOURCE_ROOT) 33 | try: 34 | subprocess.check_call(['git', 'submodule', 'sync', '--quiet']) 35 | subprocess.check_call(['git', 'submodule', 'update', '--init', 36 | '--recursive']) 37 | finally: 38 | os.chdir(cwd) 39 | 40 | 41 | def bootstrap_brightray(commit, url): 42 | bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap') 43 | subprocess.check_call([sys.executable, bootstrap, '-c', commit, url]) 44 | 45 | 46 | if __name__ == '__main__': 47 | sys.exit(main()) 48 | -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import subprocess 5 | import sys 6 | import multiprocessing 7 | 8 | 9 | SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 10 | GYP = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py') 11 | 12 | 13 | def main(): 14 | os.chdir(SOURCE_ROOT) 15 | run_gyp() 16 | build() 17 | 18 | 19 | def run_gyp(): 20 | env = os.environ.copy() 21 | gyp_pylib = os.path.join(os.path.dirname(GYP), 'pylib') 22 | env['PYTHONPATH'] = os.path.pathsep.join([gyp_pylib, 23 | env.get('PYTHONPATH', '')]) 24 | return subprocess.call([sys.executable, GYP, '--depth', '.', 25 | 'brightray_example.gyp'], env=env) 26 | 27 | 28 | def build(): 29 | if sys.platform == 'darwin': 30 | subprocess.check_call(['xcodebuild']) 31 | return 32 | if sys.platform == 'linux2': 33 | subprocess.check_call(['make', '-j%d' % multiprocessing.cpu_count()]) 34 | return 35 | 36 | assert sys.platform in ['win32', 'cygwin'], sys.platform 37 | program_files = os.environ.get('PROGRAMFILES(X86)', os.environ['PROGRAMFILES']) 38 | msbuild = os.path.join(program_files, 'MSBuild', '12.0', 'Bin', 'MSBuild.exe') 39 | subprocess.check_call([msbuild, 'brightray_example.sln']) 40 | 41 | 42 | if __name__ == '__main__': 43 | sys.exit(main()) 44 | -------------------------------------------------------------------------------- /script/cibuild: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import subprocess 5 | import sys 6 | 7 | 8 | SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 9 | # We're in JENKINS_ROOT/workspace/brightray_example. Walk up to JENKINS_ROOT. 10 | JENKINS_ROOT = os.path.dirname(os.path.dirname(SOURCE_ROOT)) 11 | S3_CREDENTIALS_FILE = os.path.join(JENKINS_ROOT, 'config', 's3credentials') 12 | 13 | 14 | def main(): 15 | if not os.path.isfile(S3_CREDENTIALS_FILE): 16 | return 'Error: Can\'t find {0}'.format(S3_CREDENTIALS_FILE) 17 | copy_to_environment(S3_CREDENTIALS_FILE) 18 | 19 | run_script('bootstrap', 'https://{0}.s3.amazonaws.com/libchromiumcontent'.format(os.environ['JANKY_ARTIFACTS_S3_BUCKET'])) 20 | run_script('build') 21 | 22 | 23 | def copy_to_environment(credentials_file): 24 | with open(credentials_file, 'r') as f: 25 | for line in f: 26 | key, value = line.strip().split('=') 27 | value = value.strip("'") 28 | os.environ[key] = value 29 | 30 | 31 | def run_script(script, *args): 32 | script = os.path.join('script', script) 33 | sys.stderr.write('+ {0}\n'.format(script)) 34 | sys.stderr.flush() 35 | subprocess.check_call([sys.executable, script] + list(args)) 36 | 37 | 38 | if __name__ == '__main__': 39 | sys.exit(main()) 40 | -------------------------------------------------------------------------------- /tools/linux/copy-chrome-sandbox.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT=$(dirname $(dirname $(dirname $0) ) ) 4 | SRC=$ROOT/vendor/brightray/vendor/download/libchromiumcontent/Release/chrome_sandbox 5 | DST=$ROOT/out/Debug/chrome-sandbox 6 | 7 | if [ $EUID != 0 ]; then 8 | echo You must be root to run this script. 9 | exit 1 10 | fi 11 | 12 | rm -f "$DST" && 13 | cp "$SRC" "$DST" && 14 | chown root.root "$DST" && 15 | chmod 4755 "$DST" || ( 16 | echo Could not copy "$SRC" to "$DST" setuid. 17 | rm -f "$DST" 18 | exit 1 19 | ) 20 | -------------------------------------------------------------------------------- /tools/mac/create-framework-subdir-symlinks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | cd "${BUILT_PRODUCTS_DIR}/${1}.framework" 6 | shift 7 | 8 | while [ ! -z "${1}" ]; do 9 | echo "Adding symlink for ${1}" 10 | ln -sf Versions/Current/"${1}" "${1}" 11 | shift 12 | done 13 | --------------------------------------------------------------------------------