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

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

Issue 734903004: [DevTools] Remove legacy code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 } 1105 }
1106 1106
1107 void DevToolsWindow::OnLoadCompleted() { 1107 void DevToolsWindow::OnLoadCompleted() {
1108 // First seed inspected tab id for extension APIs. 1108 // First seed inspected tab id for extension APIs.
1109 WebContents* inspected_web_contents = GetInspectedWebContents(); 1109 WebContents* inspected_web_contents = GetInspectedWebContents();
1110 if (inspected_web_contents) { 1110 if (inspected_web_contents) {
1111 SessionTabHelper* session_tab_helper = 1111 SessionTabHelper* session_tab_helper =
1112 SessionTabHelper::FromWebContents(inspected_web_contents); 1112 SessionTabHelper::FromWebContents(inspected_web_contents);
1113 if (session_tab_helper) { 1113 if (session_tab_helper) {
1114 base::FundamentalValue tabId(session_tab_helper->session_id().id()); 1114 base::FundamentalValue tabId(session_tab_helper->session_id().id());
1115 // TODO(dgozman): remove |WebInspector.setInspectedTabId| call in M45. 1115 bindings_->CallClientFunction("InspectorFrontendAPI.setInspectedTabId",
1116 bindings_->CallClientFunction( 1116 &tabId, NULL, NULL);
1117 "(InspectorFrontendAPI.setInspectedTabId ||"
1118 "WebInspector.setInspectedTabId)",
1119 &tabId, NULL, NULL);
1120 } 1117 }
1121 } 1118 }
1122 1119
1123 if (life_stage_ == kClosing) 1120 if (life_stage_ == kClosing)
1124 return; 1121 return;
1125 1122
1126 // We could be in kLoadCompleted state already if frontend reloads itself. 1123 // We could be in kLoadCompleted state already if frontend reloads itself.
1127 if (life_stage_ != kLoadCompleted) { 1124 if (life_stage_ != kLoadCompleted) {
1128 // Load is completed when both kIsDockedSet and kOnLoadFired happened. 1125 // Load is completed when both kIsDockedSet and kOnLoadFired happened.
1129 // Here we set kOnLoadFired. 1126 // Here we set kOnLoadFired.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 closure.Run(); 1231 closure.Run();
1235 return; 1232 return;
1236 } 1233 }
1237 load_completed_callback_ = closure; 1234 load_completed_callback_ = closure;
1238 } 1235 }
1239 1236
1240 bool DevToolsWindow::ForwardKeyboardEvent( 1237 bool DevToolsWindow::ForwardKeyboardEvent(
1241 const content::NativeWebKeyboardEvent& event) { 1238 const content::NativeWebKeyboardEvent& event) {
1242 return event_forwarder_->ForwardEvent(event); 1239 return event_forwarder_->ForwardEvent(event);
1243 } 1240 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698