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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 155206: DevTools: remove extensions-related workaround from the docked devtools windo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/browser_list.h" 8 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 IPC::Message* m = new IPC::Message(message); 84 IPC::Message* m = new IPC::Message(message);
85 m->set_routing_id(target_host->routing_id()); 85 m->set_routing_id(target_host->routing_id());
86 target_host->Send(m); 86 target_host->Send(m);
87 } 87 }
88 88
89 void DevToolsWindow::InspectedTabClosing() { 89 void DevToolsWindow::InspectedTabClosing() {
90 if (docked_) { 90 if (docked_) {
91 // Update dev tools to reflect removed dev tools window. 91 // Update dev tools to reflect removed dev tools window.
92 inspected_window_->UpdateDevTools(); 92 inspected_window_->UpdateDevTools();
93 // In case of docked tab_contents we own it, so delete here. 93 // In case of docked tab_contents we own it, so delete here.
94 delete tab_contents_;
94 95
95 // Instead of deleting tab contents, we add it into the
96 // stub browser and initiate regular closure;
97 Browser* b = Browser::Create(profile_);
98 b->tabstrip_model()->AddTabContents(tab_contents_, -1, false,
99 PageTransition::START_PAGE, true);
100 b->CloseAllTabs();
101 delete this; 96 delete this;
102 } else { 97 } else {
103 // First, initiate self-destruct to free all the registrars. 98 // First, initiate self-destruct to free all the registrars.
104 // Then close all tabs. Browser will take care of deleting tab_contents 99 // Then close all tabs. Browser will take care of deleting tab_contents
105 // for us. 100 // for us.
106 Browser* browser = browser_; 101 Browser* browser = browser_;
107 delete this; 102 delete this;
108 browser->CloseAllTabs(); 103 browser->CloseAllTabs();
109 } 104 }
110 } 105 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 &tab_contents_->controller()) { 212 &tab_contents_->controller()) {
218 // This happens when browser closes all of its tabs as a result 213 // This happens when browser closes all of its tabs as a result
219 // of window.Close event. 214 // of window.Close event.
220 // Notify manager that this DevToolsClientHost no longer exists and 215 // Notify manager that this DevToolsClientHost no longer exists and
221 // initiate self-destuct here. 216 // initiate self-destuct here.
222 NotifyCloseListener(); 217 NotifyCloseListener();
223 delete this; 218 delete this;
224 } 219 }
225 } 220 }
226 } 221 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698