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

Unified Diff: extensions/browser/guest_view/app_view/app_view_guest.cc

Issue 1392343002: Reduce the public method footprint of GuestViewBase and derived types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/guest_view/app_view/app_view_guest.cc
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc
index 64bcd906eee20357c1cd13cbabb722d4130cbe27..2096d50cd3cf6a832124b2ec26be627722edd9b2 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -112,46 +112,6 @@ AppViewGuest::AppViewGuest(WebContents* owner_web_contents)
AppViewGuest::~AppViewGuest() {
}
-bool AppViewGuest::HandleContextMenu(const content::ContextMenuParams& params) {
- if (app_view_guest_delegate_) {
- return app_view_guest_delegate_->HandleContextMenu(web_contents(), params);
- }
- return false;
-}
-
-void AppViewGuest::RequestMediaAccessPermission(
- WebContents* web_contents,
- const content::MediaStreamRequest& request,
- const content::MediaResponseCallback& callback) {
- if (!app_delegate_) {
- WebContentsDelegate::RequestMediaAccessPermission(web_contents, request,
- callback);
- return;
- }
- const ExtensionSet& enabled_extensions =
- ExtensionRegistry::Get(browser_context())->enabled_extensions();
- const Extension* guest_extension =
- enabled_extensions.GetByID(guest_extension_id_);
-
- app_delegate_->RequestMediaAccessPermission(web_contents, request, callback,
- guest_extension);
-}
-
-bool AppViewGuest::CheckMediaAccessPermission(WebContents* web_contents,
- const GURL& security_origin,
- content::MediaStreamType type) {
- if (!app_delegate_) {
- return WebContentsDelegate::CheckMediaAccessPermission(
- web_contents, security_origin, type);
- }
- const ExtensionSet& enabled_extensions =
- ExtensionRegistry::Get(browser_context())->enabled_extensions();
- const Extension* guest_extension =
- enabled_extensions.GetByID(guest_extension_id_);
-
- return app_delegate_->CheckMediaAccessPermission(
- web_contents, security_origin, type, guest_extension);
-}
bool AppViewGuest::CanRunInDetachedState() const {
return true;
@@ -233,6 +193,47 @@ int AppViewGuest::GetTaskPrefix() const {
return IDS_EXTENSION_TASK_MANAGER_APPVIEW_TAG_PREFIX;
}
+bool AppViewGuest::HandleContextMenu(const content::ContextMenuParams& params) {
+ if (app_view_guest_delegate_) {
+ return app_view_guest_delegate_->HandleContextMenu(web_contents(), params);
+ }
+ return false;
+}
+
+void AppViewGuest::RequestMediaAccessPermission(
+ WebContents* web_contents,
+ const content::MediaStreamRequest& request,
+ const content::MediaResponseCallback& callback) {
+ if (!app_delegate_) {
+ WebContentsDelegate::RequestMediaAccessPermission(web_contents, request,
+ callback);
+ return;
+ }
+ const ExtensionSet& enabled_extensions =
+ ExtensionRegistry::Get(browser_context())->enabled_extensions();
+ const Extension* guest_extension =
+ enabled_extensions.GetByID(guest_extension_id_);
+
+ app_delegate_->RequestMediaAccessPermission(web_contents, request, callback,
+ guest_extension);
+}
+
+bool AppViewGuest::CheckMediaAccessPermission(WebContents* web_contents,
+ const GURL& security_origin,
+ content::MediaStreamType type) {
+ if (!app_delegate_) {
+ return WebContentsDelegate::CheckMediaAccessPermission(
+ web_contents, security_origin, type);
+ }
+ const ExtensionSet& enabled_extensions =
+ ExtensionRegistry::Get(browser_context())->enabled_extensions();
+ const Extension* guest_extension =
+ enabled_extensions.GetByID(guest_extension_id_);
+
+ return app_delegate_->CheckMediaAccessPermission(
+ web_contents, security_origin, type, guest_extension);
+}
+
void AppViewGuest::CompleteCreateWebContents(
const GURL& url,
const Extension* guest_extension,

Powered by Google App Engine
This is Rietveld 408576698