Commit graph

631 commits

Author SHA1 Message Date
Cheng Zhao
7a2dc3fc4f mac: Make focus back to browser window when devtools is closed. 2014-07-09 10:24:10 +08:00
Cheng Zhao
2efeaa268f Place DevTools WebContents underneath inspected WebContents.
This commit has this strategy implemented on Mac.

See https://code.google.com/p/chromium/issues/detail?id=318751.
2014-07-09 10:24:10 +08:00
Cheng Zhao
7d130c9697 mac: Revert to simplest undocked-only devtools.
This makes porting Chrome's devtools easier.
2014-07-09 10:24:10 +08:00
Adam Roben
8f367f6b35 More coding style fixes 2014-07-07 14:42:30 -04:00
Adam Roben
e86c409e6b Update DevToolsWindow to use views and aura
This is required to make it work in Chrome 35.
2014-07-07 14:27:23 -04:00
Adam Roben
f65246b3cd Fix coding style 2014-07-07 14:27:02 -04:00
Adam Roben
8f2a2e19b5 Really fix unused-variable warnings
I misunderstood how ALLOW_UNUSED is meant to be used. Using a macro like
MSV_WARNING_SUPPRESS() would be nice, but for some reason it isn't working for
me. So now we just manually reference the variable in the code.
2014-07-07 14:21:40 -04:00
Adam Roben
5b2a62627e Silence unused variable warning on Windows 2014-07-07 13:55:10 -04:00
Adam Roben
6bae1f4b44 Set up a native screen on Windows
This is needed to prevent a crash inside aura::WindowTreeHost::InitCompositor.
2014-07-07 13:53:24 -04:00
Adam Roben
307d936d75 Update to use CR_* Windows message macros
See https://codereview.chromium.org/146833020.
2014-06-27 13:40:33 -04:00
Adam Roben
918f38e13f Fix long line 2014-06-27 11:59:01 -04:00
Adam Roben
51ac56e4c4 Update cookie store code for Chrome 35
See https://codereview.chromium.org/110883017
2014-06-27 11:54:28 -04:00
Adam Roben
afc889b883 Update NetworkDelegate for Chrome 35 2014-06-27 11:54:27 -04:00
Adam Roben
3a71958e16 Update MediaStreamDevicesController for Chrome 35
See https://codereview.chromium.org/180633008
2014-06-27 11:54:27 -04:00
Adam Roben
e003cc9a0a Update MediaCaptureDevicesDispatcher for Chrome 35
See https://codereview.chromium.org/183743021
2014-06-27 11:54:27 -04:00
Adam Roben
5b788476a5 Update for move of string symbols into base:: 2014-06-27 11:54:27 -04:00
Adam Roben
5b93dc74e6 Update BrowserContext for Chrome 35 2014-06-27 11:54:27 -04:00
Adam Roben
42b86242ea Add support for Chrome 35's "protocol interceptors"
See https://codereview.chromium.org/187223003
2014-06-27 11:54:27 -04:00
Adam Roben
500861d63d Update prefs code for Chrome 35
See https://codereview.chromium.org/64193003
2014-06-27 11:54:27 -04:00
Rus Maxham
cca71fce9f less removal of whitespace 2014-06-23 13:16:01 -07:00
Rus Maxham
3acba90225 brightray namespaced frameAutosaveName 2014-06-23 13:12:20 -07:00
Rus Maxham
92a4b25e47 - remember position and size of developer tools window 2014-06-23 12:48:52 -07:00
Cheng Zhao
e71927c5da Closing devtools window means it is not visible. 2014-06-17 16:51:46 +08:00
Cheng Zhao
1b274a1fd6 Add comments on the usage of attached devtools. 2014-06-10 12:44:30 +08:00
Cheng Zhao
9a70c9bb44 Enable undocked devtools. 2014-06-10 12:35:23 +08:00
Cheng Zhao
d70d24c360 Implement setting dock side. 2014-06-10 12:03:20 +08:00
Cheng Zhao
1943d88bdc Handle focus correctly. 2014-06-10 11:37:07 +08:00
Cheng Zhao
bd0f9df96c Put devtools in split view. 2014-06-10 10:29:39 +08:00
Cheng Zhao
566022cb66 ContainerView should manage itself. 2014-06-10 10:03:35 +08:00
Cheng Zhao
b0374b6a1d Use views::View to represent web view. 2014-06-10 09:58:28 +08:00
Cheng Zhao
5e0dd5c687 Remove from notification center when web contents is destroyed. 2014-04-23 11:20:12 +08:00
Cheng Zhao
54060ed53d Enable delegate to override SaveToFile and AppendToFile. 2014-04-05 09:21:47 +08:00
Cheng Zhao
d2ff5ad798 Provide a way to close devtools completely. 2014-03-20 09:26:21 +08:00
Cheng Zhao
5768ff6981 Enable delegate to change the dock side. 2014-03-04 19:47:33 +08:00
Cheng Zhao
e3aaaf2643 Add InspectableWebContentsDelegate. 2014-03-04 16:26:50 +08:00
Adam Roben
f7fb6371c2 Increase the open file limit on OS X to 1024
The default (256) is too low for pages that load a lot of resources all at
once. See https://codereview.chromium.org/125151 and bugs like
https://code.google.com/p/chromium/issues/detail?id=14137 and
https://code.google.com/p/chromium/issues/detail?id=151039. The new limit
matches what Chrome itself uses.
2014-01-31 10:43:38 -05:00
Adam Roben
e8de51a8dd Destroy ResourceContext on the IO thread
This matches content_shell and fixes a debug assertion (and maybe even a
crash).
2014-01-30 09:03:00 -05:00
Adam Roben
c4935acbb1 Fix debug assertions about transport_security_state
This code was added to content_shell in
https://chromiumcodereview.appspot.com/16501002 and we never picked it up.
2014-01-30 09:01:23 -05:00
Adam Roben
dcaaeacfe3 Fix assertions in Debug builds about using NetworkDelegate on the wrong thread
We have to create it on the IO thread.
2014-01-30 08:36:54 -05:00
Patrick Reynolds
967e8170f5 brevity and style 2013-12-19 16:01:01 -06:00
Patrick Reynolds
8d2b392f07 undo some ugly line wrapping 2013-12-19 13:39:37 -06:00
Patrick Reynolds
4e31c0011d keep cpplint happy, mostly about line length 2013-12-19 13:06:05 -06:00
Patrick Reynolds
ef6d5dbf4e authorship 2013-12-18 23:20:00 -06:00
Patrick Reynolds
c6424672f5 comments and cleanup 2013-12-18 23:14:36 -06:00
Patrick Reynolds
04d5ed25d8 call PostClose when notification closed by click 2013-12-18 23:14:36 -06:00
Patrick Reynolds
272b3c30d3 free notifications properly 2013-12-18 23:14:36 -06:00
Patrick Reynolds
a82e9f30ed use libnotify to pop up notifications on Linux 2013-12-18 23:14:36 -06:00
Cheng Zhao
b1dc139e4b Set the proxy service a bit earlier to avoid crash. 2013-12-15 15:00:52 +08:00
Adam Roben
dc3f2050c0 Merge pull request #44 from brightray/fix-devtools-flash
Fix flash of page while resizing devtools NSSplitView divider.
2013-12-12 07:36:16 -08:00
Cheng Zhao
e0b8935fda Remove the unused dividerHidden property of GraySplitView. 2013-12-12 23:33:50 +08:00
Cheng Zhao
39f5f52423 Fix flash of page while resizing devtools NSSplitView divider. 2013-12-12 18:46:46 +08:00
Cheng Zhao
b080e5c52d Rename IsDevToolsOpened to IsDevToolsViewShowing. 2013-12-10 18:38:35 -08:00
Cheng Zhao
7a5415a3b7 Fix IsDevToolsOpened when devtools is attched to pane on Linux. 2013-12-09 13:27:22 +00:00
Cheng Zhao
a8c5911094 Implement IsDevToolsOpened for Linux. 2013-12-09 09:03:41 +00:00
Cheng Zhao
de7892cd6e Add API to get whether the devtools is opened. 2013-12-09 09:03:29 +00:00
Cheng Zhao
0a1f756ca6 Use "ProxyResolverV8" instead of "SystemProxyResolver" as proxy service.
SystemProxyResolver is untested and could cause random crashes.
2013-12-05 02:56:28 -08:00
Adam Roben
7e6f5aa734 Update for ui -> gfx moves in Chrome 31
See https://codereview.chromium.org/23769011.
2013-12-02 13:00:39 -05:00
Adam Roben
ab8cb1e3a5 Update for changes to content::CreatePersistentCookieStore in Chrome 31
I just copied how Chrome initializes this object.
2013-12-02 13:00:39 -05:00
Adam Roben
cfeddb5bcb Update for changes to net::FileProtocolHandler in Chrome 31
I just copied the way that Chrome initializes this object.
2013-12-02 13:00:39 -05:00
Adam Roben
265076f19a Update for changes to devtools in Chrome 31
browser/devtools_embedder_message_dispatcher.* came from
chrome/browser/devtools, and were modified just enough to compile within
brightray.
2013-12-02 13:00:39 -05:00
Patrick Reynolds
711aa5282b make BrowserContext::Initialize virtual 2013-11-27 15:55:06 -06:00
Adam Roben
89795c9b14 Stop the devtools from turning black when the window gets big enough
We need to use UnderlayOpenGLHostingWindow to show the devtools to ensure they
remain visible even when they get large.
2013-11-25 16:28:57 -05:00
Patrick Reynolds
470daa571c back to reinterpret_cast 2013-11-17 22:27:23 -06:00
Patrick Reynolds
9f9aeac59f safer casts, clearer if-else chain 2013-11-17 22:25:24 -06:00
Adam Roben
3d8b636f9e Fix remaining cpplint errors in inspectable_web_contents_view_linux.cc 2013-11-17 19:21:50 -05:00
Adam Roben
cdbfff2fcf Fix backwards typedef 2013-11-17 19:15:26 -05:00
Adam Roben
7b47a6152d Fix cpplint errors in media_capture_devices_dispatcher.cc 2013-11-17 19:14:08 -05:00
Adam Roben
4938fc62ad Fix most cpplint errors in inspectable_web_contents_view_linux.cc 2013-11-17 19:12:50 -05:00
Adam Roben
1595940723 Fix cpplint errors in devtools_window.cc 2013-11-17 19:05:21 -05:00
Adam Roben
0271ff1964 Fix cpplint errors in inspectable_web_contents_view_win.h 2013-11-17 19:03:41 -05:00
Adam Roben
073b1c164b Fix cpplint errors in inspectable_web_contents_view_win.cc 2013-11-17 19:02:49 -05:00
Adam Roben
779dfd2baf Fix most cpplint errors in devtools_window.h
It's still complaining about the non-const reference in BOOL&.
2013-11-17 19:01:36 -05:00
Adam Roben
6aec3006e6 Fix whitespace/comment errors 2013-11-17 18:56:07 -05:00
Adam Roben
236efa8be5 Fix cpplint errors in bry_application.h 2013-11-17 18:53:34 -05:00
Adam Roben
23bcf4099f Fix cpplint errors in inspectable_web_contents_view_linux.h 2013-11-17 18:52:02 -05:00
Adam Roben
9f82d58761 Fix cpplint errors in web_ui_controller_factory.h 2013-11-17 18:46:23 -05:00
Adam Roben
7a362b7413 Fix cpplint errors in url_request_context_getter.h 2013-11-17 18:43:46 -05:00
Adam Roben
cf4d966958 Fix cpplint errors in notification_presenter_mac.h 2013-11-17 18:43:20 -05:00
Adam Roben
d4ad45334f Turn off build/include_what_you_use
Chromium doesn't seem to use this rule.
2013-11-17 18:42:15 -05:00
Adam Roben
ec59df1a51 Fix cpplint errors in network_delegate.h 2013-11-17 18:36:34 -05:00
Adam Roben
cb684c5c6e Fix cpplint errors in inspectable_web_contents_view_mac.h 2013-11-17 18:24:36 -05:00
Adam Roben
ea689b31a4 Fix cpplint errors in inspectable_web_contents_view.h 2013-11-17 18:23:13 -05:00
Adam Roben
877a1f0371 Fix cpplint errors in inspectable_web_contents_impl.h 2013-11-17 18:22:48 -05:00
Adam Roben
0805b414e9 Fix cpplint errors in inspectable_web_contents.h 2013-11-17 18:20:54 -05:00
Adam Roben
9ac1a539ee Fix all remaining readability/namespace errors 2013-11-17 18:20:17 -05:00
Adam Roben
fd54c435a9 Fix cpplint errors in default_web_contents_delegate.h 2013-11-17 18:18:22 -05:00
Adam Roben
7bada78519 Fix cpplint errors in browser_main_parts.h 2013-11-17 18:17:23 -05:00
Adam Roben
a6ecd039e2 Fix typos 2013-11-17 18:16:41 -05:00
Adam Roben
991133b8e9 Fix cpplint errors in browser_context.h 2013-11-17 18:15:10 -05:00
Adam Roben
74661c342f Fix cpplint errors in browser_client.h 2013-11-17 18:13:10 -05:00
Adam Roben
80dab9d862 Fix cpplint errors in web_ui_controller_factory.cc 2013-11-17 18:12:05 -05:00
Adam Roben
57ae05b636 Fix cpplint errors in url_request_context_getter.cc 2013-11-17 18:11:47 -05:00
Adam Roben
843b21a3e8 Fix cpplint errors in network_delegate.cc 2013-11-17 18:09:21 -05:00
Adam Roben
784e270a4f Fix cpplint errors in inspectable_web_contents_impl.cc 2013-11-17 18:08:34 -05:00
Adam Roben
c97a22ef8d Fix cpplint errors in inspectable_web_contents.cc 2013-11-17 17:54:14 -05:00
Adam Roben
ef5992b0eb Fix cpplint errors in devtools_ui.cc 2013-11-17 17:53:38 -05:00
Adam Roben
dfb8a809ee Fix cpplint errors in default_web_contents_delegate.cc 2013-11-17 17:52:24 -05:00
Adam Roben
a35a57c3c4 Fix cpplint errors in browser_main_parts.cc 2013-11-17 17:51:19 -05:00
Adam Roben
cc4aeb995b Fix cpplint errors in browser_context.cc 2013-11-17 17:42:56 -05:00
Adam Roben
101a7bfa21 Fix cpplint errors in browser_client.cc 2013-11-17 17:39:01 -05:00
Patrick Reynolds
a18842de1a give member variables trailing _
- also, reorder member variables to come after methods
2013-11-15 22:22:25 -06:00
Patrick Reynolds
282639a79a implement dev tools 2013-11-15 14:23:52 -06:00
Patrick Reynolds
6053911bd2 Merge branch 'master' into linux 2013-11-08 20:53:43 -06:00
Patrick Reynolds
c6ce51863a implement GetNativeView 2013-11-07 23:42:15 -06:00
Patrick Reynolds
90e619a6d9 fix typo 2013-11-07 17:25:51 -06:00
Patrick Reynolds
04b9bd21f8 WIP: builds (but displys nothing) on Linux 2013-11-07 14:02:35 -06:00
Adam Roben
ae1e26bddd Fix a hang on quit when application cache is used
If you navigated to a page that used the HTML Application Cache, you'd see a
hang on quit with a backtrace like so:

+     2825 content::ContentMain(int, char const**, content::ContentMainDelegate*)  (in libchromiumcontent.dylib) + 64  [0xb33190]
+       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x96b261  [0xb34261]
+         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x96a409  [0xb33409]
+           2825 content::BrowserMain(content::MainFunctionParams const&)  (in libchromiumcontent.dylib) + 200  [0x14290b8]
+             2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x1265426  [0x142e426]
+               2825 content::BrowserMainLoop::~BrowserMainLoop()  (in libchromiumcontent.dylib) + 17  [0x14294a1]
+                 2825 content::BrowserMainLoop::~BrowserMainLoop()  (in libchromiumcontent.dylib) + 357  [0x1429625]
+                     2825 brightray::BrowserMainParts::~BrowserMainParts()  (in ) + 70  [0x68df6]
+                       2825 scoped_ptr<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr()  (in ) + 23  [0x68ff7]
+                         2825 scoped_ptr<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr()  (in ) + 23  [0x69297]
+                           2825 base::internal::scoped_ptr_impl<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr_impl()  (in ) + 23  [0x692b7]
+                             2825 base::internal::scoped_ptr_impl<brightray::BrowserContext, base::DefaultDeleter<brightray::BrowserContext> >::~scoped_ptr_impl()  (in ) + 50  [0x692f2]
+                               2825 base::DefaultDeleter<brightray::BrowserContext>::operator()(brightray::BrowserContext*) const  (in ) + 46  [0x6916e]
+                                   2825 brightray::BrowserContext::~BrowserContext()  (in ) + 127  [0x672bf]
+                                     2825 base::SupportsUserData::~SupportsUserData()  (in libchromiumcontent.dylib) + 57  [0xccc019]
+                                       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0xb03230  [0xccc230]
+                                         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0xb0324e  [0xccc24e]
+                                           2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x14c4239  [0x168d239]
+                                             2825 content::StoragePartitionImpl::~StoragePartitionImpl()  (in libchromiumcontent.dylib) + 17  [0x16899a1]
+                                               2825 content::StoragePartitionImpl::~StoragePartitionImpl()  (in libchromiumcontent.dylib) + 491  [0x1689bab]
+                                                 2825 content::ChromeAppCacheService::DeleteOnCorrectThread() const  (in libchromiumcontent.dylib) + 66  [0x1424f32]
+                                                   2825 content::ChromeAppCacheService::~ChromeAppCacheService()  (in libchromiumcontent.dylib) + 50  [0x1424e32]
+                                                     2825 appcache::AppCacheService::~AppCacheService()  (in libchromiumcontent.dylib) + 301  [0x2b8ad2d]
+                                                       2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x29c9b81  [0x2b92b81]
+                                                         2825 ???  (in libchromiumcontent.dylib)  load address 0x1c9000 + 0x29c9da4  [0x2b92da4]
+                                                           2825 appcache::AppCacheDiskCache::~AppCacheDiskCache()  (in libchromiumcontent.dylib) + 17  [0x2b78c71]
+                                                             2825 appcache::AppCacheDiskCache::~AppCacheDiskCache()  (in libchromiumcontent.dylib) + 135  [0x2b78d17]
+                                                               2825 disk_cache::BackendImpl::~BackendImpl()  (in libchromiumcontent.dylib) + 17  [0x25979a1]
+                                                                 2825 disk_cache::BackendImpl::~BackendImpl()  (in libchromiumcontent.dylib) + 305  [0x2597af1]
+                                                                   2825 base::WaitableEvent::Wait()  (in libchromiumcontent.dylib) + 50  [0xccd942]
+                                                                     2825 base::WaitableEvent::TimedWait(base::TimeDelta const&)  (in libchromiumcontent.dylib) + 347  [0xccdb3b]
+                                                                       2825 base::ConditionVariable::Wait()  (in libchromiumcontent.dylib) + 35  [0xcccbb3]
+                                                                         2825 pthread_cond_wait$UNIX2003  (in libsystem_c.dylib) + 71  [0x964d3089]
+                                                                           2825 _pthread_cond_wait  (in libsystem_c.dylib) + 833  [0x9644d280]
+                                                                             2825 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x94b8e8e2]

BackendImpl was waiting on BrowserThread::CACHE, but that thread had already
been stopped. The solution is to destroy the BrowserContext before threads have
been stopped. We now do this in BrowserMainParts::PostMainMessageLoopRun, which
matches content_shell.
2013-10-23 12:16:25 -04:00
Cheng Zhao
f623ddf7fc Cleanup unused headers, data members and functions. 2013-10-11 07:17:53 -04:00
Cheng Zhao
2cd6dd791e Setup devtools in the correct phase.
* RegisterDevToolsClientHostFor should be called right after the agent_host and
  the frontend host are created.
* SetupDevToolsFrontendClient should be called before the devtools window is
  going to start navigation.
2013-10-11 07:17:03 -04:00
Cheng Zhao
9d29c8eb7c Use the "chrome-devtools://" scheme to open devtools. 2013-10-10 16:56:52 -04:00
Adam Roben
6b9e61c65d Fix flashing in WebContents we create
If the embedding app creates them it's up to them to fix this.
2013-10-10 16:24:22 -04:00
Adam Roben
8ae459e9fa Work around http://crbug.com/279472 for devtools views 2013-10-10 14:17:30 -04:00
Adam Roben
1f1f93465b Make MediaStreamDevicesController::Accept/Deny public again
Clients rely on this.
2013-10-07 17:04:40 -04:00
Adam Roben
9165424348 Update ResourceContext for Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=215991.
2013-10-07 16:31:58 -04:00
Adam Roben
4d6ee2c416 URLRequestContextStorage::set_http_server_properties takes a scoped_ptr in Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=212466.
2013-10-07 16:31:58 -04:00
Adam Roben
d1623535e8 Update browser/media/* for Chrome 30
I took the latest versions of these files from chrome/browser/media,
then pared them down to remove all Chrome-isms and uses of UI to prompt
the user about allowing access to devices.
2013-10-07 16:31:58 -04:00
Adam Roben
aa4f991659 Add DevToolsFrontendHostDelegate indexing methods from Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=215622.
2013-10-07 16:31:57 -04:00
Adam Roben
4d59060657 BrowserContext::RequestMIDISysExPermission was added in Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=211437.
2013-10-07 16:31:57 -04:00
Adam Roben
c1c4344879 BrowserContext::GetSpeechRecognitionPreferences is gone in Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=210616.
2013-10-07 16:31:57 -04:00
Adam Roben
eb446fc707 content::BrowserContext::GetPath is a const member function in Chrome 30
See http://src.chromium.org/viewvc/chrome?view=revision&revision=211931.
2013-10-07 16:31:57 -04:00
Adam Roben
64a5ce6e15 Update for move of scoped_nsobject header and namespace
See http://src.chromium.org/viewvc/chrome?view=revision&revision=207616.
2013-10-07 16:31:57 -04:00
Adam Roben
1e99ec9aed Update #includes for moves of string-related headers
See http://src.chromium.org/viewvc/chrome?view=revision&revision=205050.
2013-10-07 16:31:57 -04:00
Adam Roben
7d3f371b51 Update for move of MessageLoop into base namespace 2013-08-23 16:56:41 -04:00
Adam Roben
4946ec9081 Update for utf_string_conversions.h move in Chrome 29 2013-08-23 16:56:30 -04:00
Adam Roben
710d0fc6c5 Make overriding BrowserContext::RegisterPrefs actually work
We were calling it before derived classes' vtables were set up. Now we wait to
call it until the BrowserContext is fully constructed.
2013-08-15 16:07:14 -04:00
Adam Roben
9638e3956f Don't use base::DIR_APP_DATA on Linux
It doesn't exist. Instead, match content_shell by putting
application-specific data in $XDG_CONFIG_HOME or ~/.config.
2013-08-14 08:14:54 -04:00
Adam Roben
c2623d2bdc Fix typos 2013-07-31 11:52:21 -07:00
Adam Roben
2595335045 Enable navigator.webkitGetUserMedia()
The code came from chrome/browser/media, but was simplified to remove
dependencies on other parts of chrome/ and to always allow the media stream
request.
2013-07-31 11:08:45 -07:00
Adam Roben
56b904947b Avoid a crash when starting a download by disallowing downloads
Chromium crashes when starting a download if a content::DownloadManagerDelegate
is not provided. We now provide a default implementation of
content::DownloadManagerDelegate which disallows all downloads.
2013-07-24 07:56:55 -04:00
Adam Roben
33b574b434 Allow clients to supply their own NetworkDelegate implementation 2013-07-17 10:21:33 -04:00
Adam Roben
496b246405 Give BrowserContext subclasses access to GetPath() 2013-06-06 18:50:37 -04:00
Adam Roben
9ad77c4a38 Implement undocked dev tools on Windows
DevToolsWindow represents a vanilla top-level window that shows the dev tools.
It uses ui::WindowImpl to implement window functionality, which requires a
newer libchromiumcontent which contains the necessary headers for using that
class, and requires some modifications to brightray.gypi to make WTL's  headers
available.

* vendor/libchromiumcontent 2f53a96...fc02d93 (4):
  > Export third_party/wtl/include headers
  > Export test_support_base.pdb and test_support_content.pdb
  > Fix linker errors with test_support_base on Windows
  > Fix linker errors with base_prefs_test_support on Windows
2013-06-04 14:33:29 -04:00
Adam Roben
4c9870e753 Fix debug assertion about performing IO on the UI thread
We were querying the application's FILEVERSIONINFO every time we needed to
figure out the path for storing BrowserContext data. Now we cache the path the
first time we need it, which is during application initialization and before IO
prohibitions begin.
2013-06-04 14:17:16 -04:00
Cheng Zhao
27d55031f4 Set file and data protocol handler. 2013-06-02 00:25:04 +08:00
Adam Roben
3d12cb2c64 Don't crash when HTML notifications are used on Windows
Eventually we'll implement real support for this, but for now not crashing is
more important.
2013-05-31 08:05:14 -04:00
Adam Roben
2582e8561c Update to Chromium r202921
* vendor/libchromiumcontent 0d02a8d...2f53a96 (1):
  > Merge pull request #14 from brightray/latest-chromium
2013-05-30 15:07:32 -04:00
Adam Roben
cf14f09228 Stub out InspectableWebContentsViewWin
This class doesn't implement any devtools behavior yet. Right now it's just a
glorified wrapper around a content::WebContents. But it's enough to show web
content on screen on Windows!
2013-05-22 16:57:32 -04:00
Adam Roben
b970e9d5c3 Only compile HandleKeyboardEvent on Mac 2013-05-22 16:08:40 -04:00
Adam Roben
12d01e4fd5 ifdef out a bunch of Mac-specific code
This is a hacky solution but helps us deal with other compiler/linker errors.
2013-05-22 13:55:56 -04:00
Adam Roben
d07c45080d Don't use range-based for loops
VS2010 doesn't support them :-(
2013-05-16 09:15:57 -04:00
Adam Roben
5fa005d5da Fix Windows build error about passing std::string to base::FilePath::Append 2013-05-16 09:15:56 -04:00
Adam Roben
a6c5cb04f7 Use FILE_PATH_LITERAL to fix build errors 2013-05-16 09:15:56 -04:00
Adam Roben
35199ba31f MSVC doesn't allow override on destructors 2013-05-16 09:15:55 -04:00
Cheng Zhao
082f88ed3c frontend_host_ should be destructed after devtools_web_contents_. 2013-05-01 22:00:20 +08:00
Adam Roben
94d7b383c5 Fix DCHECK() assertion in BrowserClient 2013-04-24 10:54:53 -04:00
Adam Roben
48878af0db Let embedders add their own protocol handlers 2013-04-23 15:50:17 -04:00
Cheng Zhao
a5e1c46674 💄 2013-04-22 20:41:58 +08:00
Cheng Zhao
082aa61870 InspectableWebContents should be able to accept existing WebContents. 2013-04-20 13:24:45 +08:00
Adam Roben
80cb76355c Update to latest libchromiumcontent
* vendor/libchromiumcontent b6a0d85...0d607ee (3):
  > Stop trying to compile SQLitePersistentCookieStore separately
  > Update to latest Chromium trunk revision
  > Merge pull request #4 from aroben/atom
2013-04-17 23:27:53 -04:00
Adam Roben
0b5ab8e43d Size dev tools correctly when starting out docked to the right 2013-04-16 21:06:07 -04:00
Adam Roben
d9df9bcf47 Send focus/blur events when an InspectableWebContents's window gains/loses focus
We listen for key window chages and inform content::RenderWidgetHostView as
appropriate.
2013-04-09 15:11:16 -04:00
Adam Roben
3c513d6ae8 Remember where the dev tools were docked between launches 2013-04-08 13:53:53 -04:00
Adam Roben
a2a2cd1936 Add preferences support for embedding applications
Applications can use brightray::BrowserContext::prefs to get access to
preferences that are persisted between launches.
brightray::BrowserContext::RegisterPrefs must be used to register preferences
before they're accessed.

Updated libchromiumcontent to pull in preferences support.

* vendor/libchromiumcontent 3944c1c...b6a0d85 (2):
  > Actually compile the base/prefs code
  > Export symbols from base/prefs
2013-04-08 13:53:42 -04:00
Adam Roben
d2c04779e4 Include the application's version number in the user agent string 2013-04-08 12:41:30 -04:00
Adam Roben
3cef0dd98c Allow embedders to provide their own BrowserContext implementation 2013-04-01 20:10:00 -04:00
Adam Roben
080d9f59e9 Implement Notification.close() 2013-03-29 09:36:07 -04:00
Adam Roben
dde3c3f78f Make NotificationID more useful 2013-03-29 09:23:10 -04:00
Adam Roben
e59c549e62 Fire a click event when a notification is clicked 2013-03-29 09:02:40 -04:00
Adam Roben
c1463f9799 Don't fire the show event until the notification is actually shown 2013-03-29 08:59:21 -04:00
Adam Roben
e592f3ffa1 Add CreateUserNotification helper function 2013-03-29 08:32:00 -04:00
Adam Roben
08f393437e Show notifications even when the app is focused
It's a little icky to be taking over global state (NSUserNotificationCenter's
delegate) like this, but until we have evidence that it gets in someone's way
it's the pragmatic thing to do.
2013-03-28 18:09:04 -04:00
Adam Roben
651ab18a21 Turn NotificationPresenter into an abstract base class
This will allow us to have Mac-specific member variables without a bunch of
ifdefs.
2013-03-28 18:03:58 -04:00
Adam Roben
3c41af84a1 Move notification-related code into a new NotificationPresenter class 2013-03-28 17:50:07 -04:00
Adam Roben
1328c85eef Fire a show event when a notification is shown 2013-03-28 17:50:07 -04:00
Adam Roben
0893253188 Add bare-bones HTML notifications support
Calling Notification.show() now works. But Notification.close() does nothing,
and none of the notification's events fire.
2013-03-28 17:50:07 -04:00
Adam Roben
1a1fecf423 Bump the base SDK and deployment target to 10.8
This required working around an incompatibility in base/mac/foundation_util.h.
2013-03-28 17:50:07 -04:00
Adam Roben
fa9a1d7b35 Support undocking the devtools view into its own window 2013-03-27 12:35:01 -04:00
Adam Roben
c22d1cca79 Support docking the devtools on the right side of the window 2013-03-27 11:20:21 -04:00
Adam Roben
001d0197de Make the devtools close button work 2013-03-27 11:20:21 -04:00
Adam Roben
d20ecc0e2b Merge InspectableWebContentsImpl and DevToolsFrontend
While this prevents clients from easily implementing their own devtools
windows, it gives us much easier control over the devtools experience.
2013-03-27 11:20:15 -04:00
Adam Roben
881a203b57 Fix double-delete of BrowserMainParts
The caller of BrowserClient::CreateBrowserMainParts handles destroying the
BrowserMainParts instance we return.
2013-03-27 08:55:54 -04:00
Adam Roben
90691e394f Fix lifetime management of URLRequestContextGetter
I noticed this bug while adding persistent cookie storage.
2013-03-27 08:55:54 -04:00
Adam Roben
4fc0fed081 Persist cookies to disk
We use Chrome's SQLitePersistentCookieStore to save cookies to a file called
"Cookies" within the application support directory.

Fixes #5.
2013-03-27 08:55:38 -04:00
Adam Roben
3cda49b894 Update to latest libchromiumcontent 2013-03-21 15:18:25 -04:00
Adam Roben
4ca59ba279 Make keyboard shortcuts work when the dev tools are focused
We just pass unhandled key events from dev tools along to the main
WebContentsDelegate.

Part of #2.
2013-03-14 13:50:21 -04:00
Adam Roben
be6d990a97 Make keyboard shortcuts work on Mac
When the renderer doesn't handle a key event, we pass it off to the main menu
to see if it can handle it.

Part of #2.
2013-03-14 13:50:15 -04:00
Adam Roben
561fc9a342 Fix a NSSplitView leak 2013-03-14 13:06:58 -04:00
Adam Roben
b2a79856ef Add InspectableWebContents
This class can be used to create a content::WebContents that can be inspected
by the Chrome Dev Tools. This requires embedding applications to copy
content_shell.pak into their resource bundle.

Right now the dev tools are always docked to the bottom of the view; we don't
yet support undocking or changing the docked side.

Fixes #1.
2013-03-14 09:05:42 -04:00
Adam Roben
e1b5e5e1bf Store the disk cache in an app-specific location
We deduce the name of the application from the CFBundleName of the .app bundle
and use a path based on that. Similar logic should be implementable for other
platforms.

Fixes #3.
2013-03-13 16:45:00 -04:00
Adam Roben
65dd011fa3 Use Google-style header guards everywhere 2013-03-13 15:42:16 -04:00
Adam Roben
e451d92121 Initial commit 2013-03-13 15:31:24 -04:00