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

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

Issue 967213003: [DevTools] Delete old toolbox on debug reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 void DevToolsWindow::WebContentsCreated(WebContents* source_contents, 852 void DevToolsWindow::WebContentsCreated(WebContents* source_contents,
853 int opener_render_frame_id, 853 int opener_render_frame_id,
854 const base::string16& frame_name, 854 const base::string16& frame_name,
855 const GURL& target_url, 855 const GURL& target_url,
856 WebContents* new_contents) { 856 WebContents* new_contents) {
857 if (target_url.SchemeIs(content::kChromeDevToolsScheme) && 857 if (target_url.SchemeIs(content::kChromeDevToolsScheme) &&
858 target_url.path().rfind("toolbox.html") != std::string::npos) { 858 target_url.path().rfind("toolbox.html") != std::string::npos) {
859 CHECK(can_dock_); 859 CHECK(can_dock_);
860 if (toolbox_web_contents_)
861 delete toolbox_web_contents_;
860 toolbox_web_contents_ = new_contents; 862 toolbox_web_contents_ = new_contents;
861 } 863 }
862 } 864 }
863 865
864 void DevToolsWindow::CloseContents(WebContents* source) { 866 void DevToolsWindow::CloseContents(WebContents* source) {
865 CHECK(is_docked_); 867 CHECK(is_docked_);
866 life_stage_ = kClosing; 868 life_stage_ = kClosing;
867 UpdateBrowserWindow(); 869 UpdateBrowserWindow();
868 // In case of docked main_web_contents_, we own it so delete here. 870 // In case of docked main_web_contents_, we own it so delete here.
869 // Embedding DevTools window will be deleted as a result of 871 // Embedding DevTools window will be deleted as a result of
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 closure.Run(); 1203 closure.Run();
1202 return; 1204 return;
1203 } 1205 }
1204 load_completed_callback_ = closure; 1206 load_completed_callback_ = closure;
1205 } 1207 }
1206 1208
1207 bool DevToolsWindow::ForwardKeyboardEvent( 1209 bool DevToolsWindow::ForwardKeyboardEvent(
1208 const content::NativeWebKeyboardEvent& event) { 1210 const content::NativeWebKeyboardEvent& event) {
1209 return event_forwarder_->ForwardEvent(event); 1211 return event_forwarder_->ForwardEvent(event);
1210 } 1212 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698