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 "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/app_mode/app_mode_utils.h" | 9 #include "chrome/browser/app_mode/app_mode_utils.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void ChromeAppDelegate::RequestMediaAccessPermission( | 239 void ChromeAppDelegate::RequestMediaAccessPermission( |
240 content::WebContents* web_contents, | 240 content::WebContents* web_contents, |
241 const content::MediaStreamRequest& request, | 241 const content::MediaStreamRequest& request, |
242 const content::MediaResponseCallback& callback, | 242 const content::MediaResponseCallback& callback, |
243 const extensions::Extension* extension) { | 243 const extensions::Extension* extension) { |
244 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 244 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
245 web_contents, request, callback, extension); | 245 web_contents, request, callback, extension); |
246 } | 246 } |
247 | 247 |
| 248 bool ChromeAppDelegate::CheckMediaAccessPermission( |
| 249 content::WebContents* web_contents, |
| 250 const GURL& security_origin, |
| 251 content::MediaStreamType type, |
| 252 const extensions::Extension* extension) { |
| 253 return MediaCaptureDevicesDispatcher::GetInstance() |
| 254 ->CheckMediaAccessPermission( |
| 255 web_contents, security_origin, type, extension); |
| 256 } |
| 257 |
248 int ChromeAppDelegate::PreferredIconSize() { | 258 int ChromeAppDelegate::PreferredIconSize() { |
249 #if defined(USE_ASH) | 259 #if defined(USE_ASH) |
250 return ash::kShelfSize; | 260 return ash::kShelfSize; |
251 #else | 261 #else |
252 return extension_misc::EXTENSION_ICON_SMALL; | 262 return extension_misc::EXTENSION_ICON_SMALL; |
253 #endif | 263 #endif |
254 } | 264 } |
255 | 265 |
256 gfx::ImageSkia ChromeAppDelegate::GetAppDefaultIcon() { | 266 gfx::ImageSkia ChromeAppDelegate::GetAppDefaultIcon() { |
257 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 267 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
(...skipping 25 matching lines...) Expand all Loading... |
283 const content::NotificationDetails& details) { | 293 const content::NotificationDetails& details) { |
284 switch (type) { | 294 switch (type) { |
285 case chrome::NOTIFICATION_APP_TERMINATING: | 295 case chrome::NOTIFICATION_APP_TERMINATING: |
286 if (!terminating_callback_.is_null()) | 296 if (!terminating_callback_.is_null()) |
287 terminating_callback_.Run(); | 297 terminating_callback_.Run(); |
288 break; | 298 break; |
289 default: | 299 default: |
290 NOTREACHED() << "Received unexpected notification"; | 300 NOTREACHED() << "Received unexpected notification"; |
291 } | 301 } |
292 } | 302 } |
OLD | NEW |