Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 108213012: [DevTools] Remove dock side knowledge from browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test magic Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/app_window/app_window_api.h" 5 #include "chrome/browser/extensions/api/app_window/app_window_api.h"
6 6
7 #include "apps/app_window_contents.h" 7 #include "apps/app_window_contents.h"
8 #include "apps/shell_window.h" 8 #include "apps/shell_window.h"
9 #include "apps/shell_window_registry.h" 9 #include "apps/shell_window_registry.h"
10 #include "apps/ui/native_app_window.h" 10 #include "apps/ui/native_app_window.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // Opens an inspector window and delays the response to the 57 // Opens an inspector window and delays the response to the
58 // AppWindowCreateFunction until the DevToolsWindow has finished loading, and is 58 // AppWindowCreateFunction until the DevToolsWindow has finished loading, and is
59 // ready to stop on breakpoints in the callback. 59 // ready to stop on breakpoints in the callback.
60 class DevToolsRestorer : public content::NotificationObserver { 60 class DevToolsRestorer : public content::NotificationObserver {
61 public: 61 public:
62 DevToolsRestorer(AppWindowCreateFunction* delayed_create_function, 62 DevToolsRestorer(AppWindowCreateFunction* delayed_create_function,
63 content::RenderViewHost* created_view) 63 content::RenderViewHost* created_view)
64 : delayed_create_function_(delayed_create_function) { 64 : delayed_create_function_(delayed_create_function) {
65 DevToolsWindow* devtools_window = 65 DevToolsWindow* devtools_window =
66 DevToolsWindow::ToggleDevToolsWindow( 66 DevToolsWindow::OpenDevToolsWindow(
67 created_view, 67 created_view,
68 true /* force_open */,
69 DevToolsToggleAction::ShowConsole()); 68 DevToolsToggleAction::ShowConsole());
70 69
71 registrar_.Add( 70 registrar_.Add(
72 this, 71 this,
73 content::NOTIFICATION_LOAD_STOP, 72 content::NOTIFICATION_LOAD_STOP,
74 content::Source<content::NavigationController>( 73 content::Source<content::NavigationController>(
75 &devtools_window->web_contents()->GetController())); 74 &devtools_window->web_contents()->GetController()));
76 } 75 }
77 76
78 protected: 77 protected:
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 ->HadDevToolsAttached(created_view)) { 327 ->HadDevToolsAttached(created_view)) {
329 new DevToolsRestorer(this, created_view); 328 new DevToolsRestorer(this, created_view);
330 return true; 329 return true;
331 } 330 }
332 331
333 SendResponse(true); 332 SendResponse(true);
334 return true; 333 return true;
335 } 334 }
336 335
337 } // namespace extensions 336 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698