Chromium Code Reviews| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 | 232 |
| 233 private: | 233 private: |
| 234 DISALLOW_COPY_AND_ASSIGN(DevToolsToolboxDelegate); | 234 DISALLOW_COPY_AND_ASSIGN(DevToolsToolboxDelegate); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 // DevToolsWindow ------------------------------------------------------------- | 237 // DevToolsWindow ------------------------------------------------------------- |
| 238 | 238 |
| 239 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; | 239 const char DevToolsWindow::kDevToolsApp[] = "DevToolsApp"; |
| 240 | 240 |
| 241 DevToolsWindow::~DevToolsWindow() { | 241 DevToolsWindow::~DevToolsWindow() { |
| 242 UpdateBrowserWindow(); | |
| 243 UpdateBrowserToolbar(); | |
| 244 | |
| 242 if (toolbox_web_contents_) | 245 if (toolbox_web_contents_) |
|
vsevik
2014/06/11 15:36:06
Is it possible that toolbox_web_contents_ being se
| |
| 243 delete toolbox_web_contents_; | 246 delete toolbox_web_contents_; |
| 244 UpdateBrowserWindow(); | |
| 245 UpdateBrowserToolbar(); | |
| 246 | 247 |
| 247 DevToolsWindows* instances = g_instances.Pointer(); | 248 DevToolsWindows* instances = g_instances.Pointer(); |
| 248 DevToolsWindows::iterator it( | 249 DevToolsWindows::iterator it( |
| 249 std::find(instances->begin(), instances->end(), this)); | 250 std::find(instances->begin(), instances->end(), this)); |
| 250 DCHECK(it != instances->end()); | 251 DCHECK(it != instances->end()); |
| 251 instances->erase(it); | 252 instances->erase(it); |
| 252 } | 253 } |
| 253 | 254 |
| 254 // static | 255 // static |
| 255 std::string DevToolsWindow::GetDevToolsWindowPlacementPrefKey() { | 256 std::string DevToolsWindow::GetDevToolsWindowPlacementPrefKey() { |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1225 closure.Run(); | 1226 closure.Run(); |
| 1226 return; | 1227 return; |
| 1227 } | 1228 } |
| 1228 load_completed_callback_ = closure; | 1229 load_completed_callback_ = closure; |
| 1229 } | 1230 } |
| 1230 | 1231 |
| 1231 bool DevToolsWindow::ForwardKeyboardEvent( | 1232 bool DevToolsWindow::ForwardKeyboardEvent( |
| 1232 const content::NativeWebKeyboardEvent& event) { | 1233 const content::NativeWebKeyboardEvent& event) { |
| 1233 return event_forwarder_->ForwardEvent(event); | 1234 return event_forwarder_->ForwardEvent(event); |
| 1234 } | 1235 } |
| OLD | NEW |