Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: athena/extensions/chrome/athena_app_delegate.cc

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « athena/extensions/chrome/athena_app_delegate.h ('k') | chrome/browser/android/chrome_web_contents_delegate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698