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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 tab_strip_model->GetIndexOfWebContents(main_web_contents_)); 1127 tab_strip_model->GetIndexOfWebContents(main_web_contents_));
1128 browser_ = NULL; 1128 browser_ = NULL;
1129 } else if (!dock_requested && was_docked) { 1129 } else if (!dock_requested && was_docked) {
1130 UpdateBrowserWindow(); 1130 UpdateBrowserWindow();
1131 } 1131 }
1132 1132
1133 Show(DevToolsToggleAction::Show()); 1133 Show(DevToolsToggleAction::Show());
1134 } 1134 }
1135 1135
1136 void DevToolsWindow::OpenInNewTab(const std::string& url) { 1136 void DevToolsWindow::OpenInNewTab(const std::string& url) {
1137 content::OpenURLParams params( 1137 content::OpenURLParams params(GURL(url), content::Referrer(),
1138 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, 1138 WindowOpenDisposition::NEW_FOREGROUND_TAB,
1139 ui::PAGE_TRANSITION_LINK, false); 1139 ui::PAGE_TRANSITION_LINK, false);
1140 WebContents* inspected_web_contents = GetInspectedWebContents(); 1140 WebContents* inspected_web_contents = GetInspectedWebContents();
1141 if (!inspected_web_contents || !inspected_web_contents->OpenURL(params)) { 1141 if (!inspected_web_contents || !inspected_web_contents->OpenURL(params)) {
1142 chrome::ScopedTabbedBrowserDisplayer displayer(profile_); 1142 chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
1143 chrome::AddSelectedTabWithURL(displayer.browser(), GURL(url), 1143 chrome::AddSelectedTabWithURL(displayer.browser(), GURL(url),
1144 ui::PAGE_TRANSITION_LINK); 1144 ui::PAGE_TRANSITION_LINK);
1145 } 1145 }
1146 } 1146 }
1147 1147
1148 void DevToolsWindow::SetWhitelistedShortcuts( 1148 void DevToolsWindow::SetWhitelistedShortcuts(
1149 const std::string& message) { 1149 const std::string& message) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) { 1323 bool DevToolsWindow::ReloadInspectedWebContents(bool bypass_cache) {
1324 // Only route reload via front-end if the agent is attached. 1324 // Only route reload via front-end if the agent is attached.
1325 WebContents* wc = GetInspectedWebContents(); 1325 WebContents* wc = GetInspectedWebContents();
1326 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING) 1326 if (!wc || wc->GetCrashedStatus() != base::TERMINATION_STATUS_STILL_RUNNING)
1327 return false; 1327 return false;
1328 base::FundamentalValue bypass_cache_value(bypass_cache); 1328 base::FundamentalValue bypass_cache_value(bypass_cache);
1329 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage", 1329 bindings_->CallClientFunction("DevToolsAPI.reloadInspectedPage",
1330 &bypass_cache_value, nullptr, nullptr); 1330 &bypass_cache_value, nullptr, nullptr);
1331 return true; 1331 return true;
1332 } 1332 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_ui_bindings.cc ('k') | chrome/browser/download/chrome_download_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698