| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/apps/chrome_shell_window_delegate.h" | 5 #include "chrome/browser/ui/apps/chrome_shell_window_delegate.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "chrome/browser/favicon/favicon_tab_helper.h" | 8 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 9 #include "chrome/browser/file_select_helper.h" | 9 #include "chrome/browser/file_select_helper.h" |
| 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 10 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 delete source; | 52 delete source; |
| 53 return NULL; | 53 return NULL; |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| 58 ChromeShellWindowDelegate::ChromeShellWindowDelegate() {} | 58 ChromeShellWindowDelegate::ChromeShellWindowDelegate() {} |
| 59 | 59 |
| 60 ChromeShellWindowDelegate::~ChromeShellWindowDelegate() {} | 60 ChromeShellWindowDelegate::~ChromeShellWindowDelegate() {} |
| 61 | 61 |
| 62 // static |
| 62 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() { | 63 void ChromeShellWindowDelegate::DisableExternalOpenForTesting() { |
| 63 disable_external_open_for_testing_ = true; | 64 disable_external_open_for_testing_ = true; |
| 64 } | 65 } |
| 65 | 66 |
| 67 // static |
| 68 void ChromeShellWindowDelegate::EnableExternalOpenForTesting() { |
| 69 disable_external_open_for_testing_ = false; |
| 70 } |
| 71 |
| 66 void ChromeShellWindowDelegate::InitWebContents( | 72 void ChromeShellWindowDelegate::InitWebContents( |
| 67 content::WebContents* web_contents) { | 73 content::WebContents* web_contents) { |
| 68 FaviconTabHelper::CreateForWebContents(web_contents); | 74 FaviconTabHelper::CreateForWebContents(web_contents); |
| 69 } | 75 } |
| 70 | 76 |
| 71 content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab( | 77 content::WebContents* ChromeShellWindowDelegate::OpenURLFromTab( |
| 72 Profile* profile, | 78 Profile* profile, |
| 73 content::WebContents* source, | 79 content::WebContents* source, |
| 74 const content::OpenURLParams& params) { | 80 const content::OpenURLParams& params) { |
| 75 // Force all links to open in a new tab, even if they were trying to open a | 81 // Force all links to open in a new tab, even if they were trying to open a |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 host->GetRoutingID(), blocked)); | 153 host->GetRoutingID(), blocked)); |
| 148 } | 154 } |
| 149 } | 155 } |
| 150 | 156 |
| 151 bool ChromeShellWindowDelegate::IsWebContentsVisible( | 157 bool ChromeShellWindowDelegate::IsWebContentsVisible( |
| 152 content::WebContents* web_contents) { | 158 content::WebContents* web_contents) { |
| 153 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); | 159 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); |
| 154 } | 160 } |
| 155 | 161 |
| 156 } // namespace chrome | 162 } // namespace chrome |
| OLD | NEW |