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