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 "athena/extensions/chrome/athena_app_delegate.h" | 5 #include "athena/extensions/chrome/athena_app_delegate.h" |
6 | 6 |
7 #include "athena/activity/public/activity_factory.h" | 7 #include "athena/activity/public/activity_factory.h" |
8 #include "athena/activity/public/activity_manager.h" | 8 #include "athena/activity/public/activity_manager.h" |
9 #include "athena/env/public/athena_env.h" | 9 #include "athena/env/public/athena_env.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 void AthenaAppDelegate::RequestMediaAccessPermission( | 140 void AthenaAppDelegate::RequestMediaAccessPermission( |
141 content::WebContents* web_contents, | 141 content::WebContents* web_contents, |
142 const content::MediaStreamRequest& request, | 142 const content::MediaStreamRequest& request, |
143 const content::MediaResponseCallback& callback, | 143 const content::MediaResponseCallback& callback, |
144 const extensions::Extension* extension) { | 144 const extensions::Extension* extension) { |
145 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 145 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
146 web_contents, request, callback, extension); | 146 web_contents, request, callback, extension); |
147 } | 147 } |
148 | 148 |
| 149 bool AthenaAppDelegate::CheckMediaAccessPermission( |
| 150 content::WebContents* web_contents, |
| 151 const GURL& security_origin, |
| 152 content::MediaStreamType type, |
| 153 const extensions::Extension* extension) { |
| 154 return MediaCaptureDevicesDispatcher::GetInstance() |
| 155 ->CheckMediaAccessPermission( |
| 156 web_contents, security_origin, type, extension); |
| 157 } |
| 158 |
149 int AthenaAppDelegate::PreferredIconSize() { | 159 int AthenaAppDelegate::PreferredIconSize() { |
150 // TODO(oshima): Find out what to use. | 160 // TODO(oshima): Find out what to use. |
151 return extension_misc::EXTENSION_ICON_SMALL; | 161 return extension_misc::EXTENSION_ICON_SMALL; |
152 } | 162 } |
153 | 163 |
154 gfx::ImageSkia AthenaAppDelegate::GetAppDefaultIcon() { | 164 gfx::ImageSkia AthenaAppDelegate::GetAppDefaultIcon() { |
155 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 165 return *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
156 IDR_APP_DEFAULT_ICON); | 166 IDR_APP_DEFAULT_ICON); |
157 } | 167 } |
158 | 168 |
(...skipping 15 matching lines...) Expand all Loading... |
174 | 184 |
175 void AthenaAppDelegate::SetTerminatingCallback(const base::Closure& callback) { | 185 void AthenaAppDelegate::SetTerminatingCallback(const base::Closure& callback) { |
176 if (!terminating_callback_.is_null()) | 186 if (!terminating_callback_.is_null()) |
177 AthenaEnv::Get()->RemoveTerminatingCallback(terminating_callback_); | 187 AthenaEnv::Get()->RemoveTerminatingCallback(terminating_callback_); |
178 terminating_callback_ = callback; | 188 terminating_callback_ = callback; |
179 if (!terminating_callback_.is_null()) | 189 if (!terminating_callback_.is_null()) |
180 AthenaEnv::Get()->AddTerminatingCallback(terminating_callback_); | 190 AthenaEnv::Get()->AddTerminatingCallback(terminating_callback_); |
181 } | 191 } |
182 | 192 |
183 } // namespace athena | 193 } // namespace athena |
OLD | NEW |