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" |
11 #include "chrome/browser/platform_util.h" | 11 #include "chrome/browser/platform_util.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/browser_dialogs.h" | 13 #include "chrome/browser/ui/browser_dialogs.h" |
14 #include "chrome/browser/ui/browser_tabstrip.h" | 14 #include "chrome/browser/ui/browser_tabstrip.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" | 16 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" |
17 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
18 #include "content/public/browser/render_view_host.h" | 18 #include "content/public/browser/render_view_host.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_contents_view.h" | 20 #include "content/public/browser/web_contents_view.h" |
21 | 21 |
22 #if defined(USE_ASH) | 22 #if defined(USE_ASH) |
23 #include "ash/launcher/launcher_types.h" | 23 #include "ash/shelf/shelf_constants.h" |
24 #endif | 24 #endif |
25 | 25 |
26 #if defined(ENABLE_PRINTING) | 26 #if defined(ENABLE_PRINTING) |
27 #if defined(ENABLE_FULL_PRINTING) | 27 #if defined(ENABLE_FULL_PRINTING) |
28 #include "chrome/browser/printing/print_preview_message_handler.h" | 28 #include "chrome/browser/printing/print_preview_message_handler.h" |
29 #include "chrome/browser/printing/print_view_manager.h" | 29 #include "chrome/browser/printing/print_view_manager.h" |
30 #else | 30 #else |
31 #include "chrome/browser/printing/print_view_manager_basic.h" | 31 #include "chrome/browser/printing/print_view_manager_basic.h" |
32 #endif // defined(ENABLE_FULL_PRINTING) | 32 #endif // defined(ENABLE_FULL_PRINTING) |
33 #endif // defined(ENABLE_PRINTING) | 33 #endif // defined(ENABLE_PRINTING) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 content::WebContents* web_contents, | 138 content::WebContents* web_contents, |
139 const content::MediaStreamRequest& request, | 139 const content::MediaStreamRequest& request, |
140 const content::MediaResponseCallback& callback, | 140 const content::MediaResponseCallback& callback, |
141 const extensions::Extension* extension) { | 141 const extensions::Extension* extension) { |
142 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 142 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
143 web_contents, request, callback, extension); | 143 web_contents, request, callback, extension); |
144 } | 144 } |
145 | 145 |
146 int ChromeShellWindowDelegate::PreferredIconSize() { | 146 int ChromeShellWindowDelegate::PreferredIconSize() { |
147 #if defined(USE_ASH) | 147 #if defined(USE_ASH) |
148 return ash::kLauncherPreferredSize; | 148 return ash::kShelfPreferredSize; |
149 #else | 149 #else |
150 return extension_misc::EXTENSION_ICON_SMALL; | 150 return extension_misc::EXTENSION_ICON_SMALL; |
151 #endif | 151 #endif |
152 } | 152 } |
153 | 153 |
154 void ChromeShellWindowDelegate::SetWebContentsBlocked( | 154 void ChromeShellWindowDelegate::SetWebContentsBlocked( |
155 content::WebContents* web_contents, | 155 content::WebContents* web_contents, |
156 bool blocked) { | 156 bool blocked) { |
157 // RenderViewHost may be NULL during shutdown. | 157 // RenderViewHost may be NULL during shutdown. |
158 content::RenderViewHost* host = web_contents->GetRenderViewHost(); | 158 content::RenderViewHost* host = web_contents->GetRenderViewHost(); |
159 if (host) { | 159 if (host) { |
160 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( | 160 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( |
161 host->GetRoutingID(), blocked)); | 161 host->GetRoutingID(), blocked)); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 bool ChromeShellWindowDelegate::IsWebContentsVisible( | 165 bool ChromeShellWindowDelegate::IsWebContentsVisible( |
166 content::WebContents* web_contents) { | 166 content::WebContents* web_contents) { |
167 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); | 167 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); |
168 } | 168 } |
OLD | NEW |