OLD | NEW |
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/devtools/devtools_window.h" | 5 #include "chrome/browser/devtools/devtools_window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 WebContents* DevToolsWindow::ObserverWithAccessor::GetWebContents() { | 299 WebContents* DevToolsWindow::ObserverWithAccessor::GetWebContents() { |
300 return web_contents(); | 300 return web_contents(); |
301 } | 301 } |
302 | 302 |
303 // DevToolsWindow ------------------------------------------------------------- | 303 // DevToolsWindow ------------------------------------------------------------- |
304 | 304 |
305 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; | 305 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; |
306 | 306 |
307 DevToolsWindow::~DevToolsWindow() { | 307 DevToolsWindow::~DevToolsWindow() { |
| 308 life_stage_ = kClosing; |
| 309 |
308 UpdateBrowserWindow(); | 310 UpdateBrowserWindow(); |
309 UpdateBrowserToolbar(); | 311 UpdateBrowserToolbar(); |
310 | 312 |
311 if (toolbox_web_contents_) | 313 if (toolbox_web_contents_) |
312 delete toolbox_web_contents_; | 314 delete toolbox_web_contents_; |
313 | 315 |
314 DevToolsWindows* instances = g_instances.Pointer(); | 316 DevToolsWindows* instances = g_instances.Pointer(); |
315 DevToolsWindows::iterator it( | 317 DevToolsWindows::iterator it( |
316 std::find(instances->begin(), instances->end(), this)); | 318 std::find(instances->begin(), instances->end(), this)); |
317 DCHECK(it != instances->end()); | 319 DCHECK(it != instances->end()); |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 closure.Run(); | 1266 closure.Run(); |
1265 return; | 1267 return; |
1266 } | 1268 } |
1267 load_completed_callback_ = closure; | 1269 load_completed_callback_ = closure; |
1268 } | 1270 } |
1269 | 1271 |
1270 bool DevToolsWindow::ForwardKeyboardEvent( | 1272 bool DevToolsWindow::ForwardKeyboardEvent( |
1271 const content::NativeWebKeyboardEvent& event) { | 1273 const content::NativeWebKeyboardEvent& event) { |
1272 return event_forwarder_->ForwardEvent(event); | 1274 return event_forwarder_->ForwardEvent(event); |
1273 } | 1275 } |
OLD | NEW |