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/ui/apps/chrome_app_window_delegate.h" | 5 #include "chrome/browser/ui/apps/chrome_app_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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 content::WebContents* web_contents, | 198 content::WebContents* web_contents, |
199 const content::MediaStreamRequest& request, | 199 const content::MediaStreamRequest& request, |
200 const content::MediaResponseCallback& callback, | 200 const content::MediaResponseCallback& callback, |
201 const extensions::Extension* extension) { | 201 const extensions::Extension* extension) { |
202 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 202 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
203 web_contents, request, callback, extension); | 203 web_contents, request, callback, extension); |
204 } | 204 } |
205 | 205 |
206 int ChromeAppWindowDelegate::PreferredIconSize() { | 206 int ChromeAppWindowDelegate::PreferredIconSize() { |
207 #if defined(USE_ASH) | 207 #if defined(USE_ASH) |
208 return ash::kShelfPreferredSize; | 208 return ash::kShelfSize; |
209 #else | 209 #else |
210 return extension_misc::EXTENSION_ICON_SMALL; | 210 return extension_misc::EXTENSION_ICON_SMALL; |
211 #endif | 211 #endif |
212 } | 212 } |
213 | 213 |
214 void ChromeAppWindowDelegate::SetWebContentsBlocked( | 214 void ChromeAppWindowDelegate::SetWebContentsBlocked( |
215 content::WebContents* web_contents, | 215 content::WebContents* web_contents, |
216 bool blocked) { | 216 bool blocked) { |
217 // RenderViewHost may be NULL during shutdown. | 217 // RenderViewHost may be NULL during shutdown. |
218 content::RenderViewHost* host = web_contents->GetRenderViewHost(); | 218 content::RenderViewHost* host = web_contents->GetRenderViewHost(); |
219 if (host) { | 219 if (host) { |
220 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( | 220 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( |
221 host->GetRoutingID(), blocked)); | 221 host->GetRoutingID(), blocked)); |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 bool ChromeAppWindowDelegate::IsWebContentsVisible( | 225 bool ChromeAppWindowDelegate::IsWebContentsVisible( |
226 content::WebContents* web_contents) { | 226 content::WebContents* web_contents) { |
227 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); | 227 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); |
228 } | 228 } |
OLD | NEW |