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

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

Issue 2861053003: DevTools: [lighthouse] Implement performance metrics filmstrip (Closed)
Patch Set: Created 3 years, 7 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 void DevToolsWindow::CloseWindow() { 1169 void DevToolsWindow::CloseWindow() {
1170 DCHECK(is_docked_); 1170 DCHECK(is_docked_);
1171 life_stage_ = kClosing; 1171 life_stage_ = kClosing;
1172 main_web_contents_->DispatchBeforeUnload(); 1172 main_web_contents_->DispatchBeforeUnload();
1173 } 1173 }
1174 1174
1175 void DevToolsWindow::Inspect(scoped_refptr<content::DevToolsAgentHost> host) { 1175 void DevToolsWindow::Inspect(scoped_refptr<content::DevToolsAgentHost> host) {
1176 DevToolsWindow::OpenDevToolsWindow(host, profile_); 1176 DevToolsWindow::OpenDevToolsWindow(host, profile_);
1177 } 1177 }
1178 1178
1179 void DevToolsWindow::SetInspectedPageBounds(const gfx::Rect& rect) { 1179 void DevToolsWindow::SetInspectedPageBounds(const gfx::Rect& rect, bool force) {
1180 DevToolsContentsResizingStrategy strategy(rect); 1180 DevToolsContentsResizingStrategy strategy(rect);
1181 if (contents_resizing_strategy_.Equals(strategy)) 1181 if (!force && contents_resizing_strategy_.Equals(strategy))
1182 return; 1182 return;
1183 1183
1184 contents_resizing_strategy_.CopyFrom(strategy); 1184 contents_resizing_strategy_.CopyFrom(strategy);
1185 UpdateBrowserWindow(); 1185 UpdateBrowserWindow();
1186 } 1186 }
1187 1187
1188 void DevToolsWindow::InspectElementCompleted() { 1188 void DevToolsWindow::InspectElementCompleted() {
1189 if (!inspect_element_start_time_.is_null()) { 1189 if (!inspect_element_start_time_.is_null()) {
1190 UMA_HISTOGRAM_TIMES("DevTools.InspectElement", 1190 UMA_HISTOGRAM_TIMES("DevTools.InspectElement",
1191 base::TimeTicks::Now() - inspect_element_start_time_); 1191 base::TimeTicks::Now() - inspect_element_start_time_);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1433 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1434 // Only route reload via front-end if the agent is attached. 1434 // Only route reload via front-end if the agent is attached.
1435 WebContents* wc = GetInspectedWebContents(); 1435 WebContents* wc = GetInspectedWebContents();
1436 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1436 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1437 return false; 1437 return false;
1438 base::Value bypass_cache_value(bypass_cache); 1438 base::Value bypass_cache_value(bypass_cache);
1439 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1439 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1440 &bypass_cache_value, nullptr, nullptr); 1440 &bypass_cache_value, nullptr, nullptr);
1441 return true; 1441 return true;
1442 } 1442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698