| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ui_bindings.h" | 5 #include "chrome/browser/devtools/devtools_ui_bindings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 content::WebContents* web_contents_; | 207 content::WebContents* web_contents_; |
| 208 DISALLOW_COPY_AND_ASSIGN(DefaultBindingsDelegate); | 208 DISALLOW_COPY_AND_ASSIGN(DefaultBindingsDelegate); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 void DefaultBindingsDelegate::ActivateWindow() { | 211 void DefaultBindingsDelegate::ActivateWindow() { |
| 212 web_contents_->GetDelegate()->ActivateContents(web_contents_); | 212 web_contents_->GetDelegate()->ActivateContents(web_contents_); |
| 213 web_contents_->Focus(); | 213 web_contents_->Focus(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { | 216 void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { |
| 217 content::OpenURLParams params( | 217 content::OpenURLParams params(GURL(url), content::Referrer(), |
| 218 GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, | 218 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 219 ui::PAGE_TRANSITION_LINK, false); | 219 ui::PAGE_TRANSITION_LINK, false); |
| 220 Browser* browser = FindBrowser(web_contents_); | 220 Browser* browser = FindBrowser(web_contents_); |
| 221 browser->OpenURL(params); | 221 browser->OpenURL(params); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void DefaultBindingsDelegate::InspectedContentsClosing() { | 224 void DefaultBindingsDelegate::InspectedContentsClosing() { |
| 225 web_contents_->ClosePage(); | 225 web_contents_->ClosePage(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 InfoBarService* DefaultBindingsDelegate::GetInfoBarService() { | 228 InfoBarService* DefaultBindingsDelegate::GetInfoBarService() { |
| 229 return InfoBarService::FromWebContents(web_contents_); | 229 return InfoBarService::FromWebContents(web_contents_); |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 void DevToolsUIBindings::FrontendLoaded() { | 1099 void DevToolsUIBindings::FrontendLoaded() { |
| 1100 if (frontend_loaded_) | 1100 if (frontend_loaded_) |
| 1101 return; | 1101 return; |
| 1102 frontend_loaded_ = true; | 1102 frontend_loaded_ = true; |
| 1103 | 1103 |
| 1104 // Call delegate first - it seeds importants bit of information. | 1104 // Call delegate first - it seeds importants bit of information. |
| 1105 delegate_->OnLoadCompleted(); | 1105 delegate_->OnLoadCompleted(); |
| 1106 | 1106 |
| 1107 AddDevToolsExtensionsToClient(); | 1107 AddDevToolsExtensionsToClient(); |
| 1108 } | 1108 } |
| OLD | NEW |