| 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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 10 #include "chrome/browser/file_select_helper.h" | 10 #include "chrome/browser/file_select_helper.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 content::WebContents* web_contents, | 219 content::WebContents* web_contents, |
| 220 const content::MediaStreamRequest& request, | 220 const content::MediaStreamRequest& request, |
| 221 const content::MediaResponseCallback& callback, | 221 const content::MediaResponseCallback& callback, |
| 222 const extensions::Extension* extension) { | 222 const extensions::Extension* extension) { |
| 223 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 223 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
| 224 web_contents, request, callback, extension); | 224 web_contents, request, callback, extension); |
| 225 } | 225 } |
| 226 | 226 |
| 227 int ChromeAppWindowDelegate::PreferredIconSize() { | 227 int ChromeAppWindowDelegate::PreferredIconSize() { |
| 228 #if defined(USE_ASH) | 228 #if defined(USE_ASH) |
| 229 return ash::kShelfPreferredSize; | 229 return ash::kShelfSize; |
| 230 #else | 230 #else |
| 231 return extension_misc::EXTENSION_ICON_SMALL; | 231 return extension_misc::EXTENSION_ICON_SMALL; |
| 232 #endif | 232 #endif |
| 233 } | 233 } |
| 234 | 234 |
| 235 void ChromeAppWindowDelegate::SetWebContentsBlocked( | 235 void ChromeAppWindowDelegate::SetWebContentsBlocked( |
| 236 content::WebContents* web_contents, | 236 content::WebContents* web_contents, |
| 237 bool blocked) { | 237 bool blocked) { |
| 238 // RenderViewHost may be NULL during shutdown. | 238 // RenderViewHost may be NULL during shutdown. |
| 239 content::RenderViewHost* host = web_contents->GetRenderViewHost(); | 239 content::RenderViewHost* host = web_contents->GetRenderViewHost(); |
| 240 if (host) { | 240 if (host) { |
| 241 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( | 241 host->Send(new ChromeViewMsg_SetVisuallyDeemphasized( |
| 242 host->GetRoutingID(), blocked)); | 242 host->GetRoutingID(), blocked)); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 | 245 |
| 246 bool ChromeAppWindowDelegate::IsWebContentsVisible( | 246 bool ChromeAppWindowDelegate::IsWebContentsVisible( |
| 247 content::WebContents* web_contents) { | 247 content::WebContents* web_contents) { |
| 248 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); | 248 return platform_util::IsVisible(web_contents->GetView()->GetNativeView()); |
| 249 } | 249 } |
| OLD | NEW |