| 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_delegate.h" | 5 #include "chrome/browser/ui/apps/chrome_app_delegate.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 const GURL& security_origin, | 275 const GURL& security_origin, |
| 276 content::MediaStreamType type, | 276 content::MediaStreamType type, |
| 277 const extensions::Extension* extension) { | 277 const extensions::Extension* extension) { |
| 278 return MediaCaptureDevicesDispatcher::GetInstance() | 278 return MediaCaptureDevicesDispatcher::GetInstance() |
| 279 ->CheckMediaAccessPermission( | 279 ->CheckMediaAccessPermission( |
| 280 web_contents, security_origin, type, extension); | 280 web_contents, security_origin, type, extension); |
| 281 } | 281 } |
| 282 | 282 |
| 283 int ChromeAppDelegate::PreferredIconSize() { | 283 int ChromeAppDelegate::PreferredIconSize() { |
| 284 #if defined(USE_ASH) | 284 #if defined(USE_ASH) |
| 285 return ash::kShelfSize; | 285 return ash::GetShelfConstant(ash::SHELF_SIZE); |
| 286 #else | 286 #else |
| 287 return extension_misc::EXTENSION_ICON_SMALL; | 287 return extension_misc::EXTENSION_ICON_SMALL; |
| 288 #endif | 288 #endif |
| 289 } | 289 } |
| 290 | 290 |
| 291 void ChromeAppDelegate::SetWebContentsBlocked( | 291 void ChromeAppDelegate::SetWebContentsBlocked( |
| 292 content::WebContents* web_contents, | 292 content::WebContents* web_contents, |
| 293 bool blocked) { | 293 bool blocked) { |
| 294 if (!blocked) | 294 if (!blocked) |
| 295 web_contents->Focus(); | 295 web_contents->Focus(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 KeepAliveRestartOption::DISABLED)); | 333 KeepAliveRestartOption::DISABLED)); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void ChromeAppDelegate::Observe(int type, | 336 void ChromeAppDelegate::Observe(int type, |
| 337 const content::NotificationSource& source, | 337 const content::NotificationSource& source, |
| 338 const content::NotificationDetails& details) { | 338 const content::NotificationDetails& details) { |
| 339 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); | 339 DCHECK_EQ(chrome::NOTIFICATION_APP_TERMINATING, type); |
| 340 if (!terminating_callback_.is_null()) | 340 if (!terminating_callback_.is_null()) |
| 341 terminating_callback_.Run(); | 341 terminating_callback_.Run(); |
| 342 } | 342 } |
| OLD | NEW |