summaryrefslogtreecommitdiffstats
path: root/extensions/browser/guest_view
diff options
context:
space:
mode:
authorpaulmeyer <paulmeyer@chromium.org>2015-08-24 12:38:04 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-24 19:39:01 +0000
commitd7b861bad98d85ceafc877ac815c9a0eb6f47ea9 (patch)
treecf5cdac544f61b43dc618eccd181e508310d92ca /extensions/browser/guest_view
parentbe33e691030b6de0351d9a7eeaaca218685dd5bb (diff)
downloadchromium_src-d7b861bad98d85ceafc877ac815c9a0eb6f47ea9.zip
chromium_src-d7b861bad98d85ceafc877ac815c9a0eb6f47ea9.tar.gz
chromium_src-d7b861bad98d85ceafc877ac815c9a0eb6f47ea9.tar.bz2
This patch removes all the unnecessary content:: prefixes on WebContents references in guest_view_base.cc and other GuestView files.
Review URL: https://codereview.chromium.org/1307243002 Cr-Commit-Position: refs/heads/master@{#345148}
Diffstat (limited to 'extensions/browser/guest_view')
-rw-r--r--extensions/browser/guest_view/app_view/app_view_guest.cc17
-rw-r--r--extensions/browser/guest_view/extension_options/extension_options_guest.cc17
-rw-r--r--extensions/browser/guest_view/extension_view/extension_view_guest.cc10
-rw-r--r--extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc15
-rw-r--r--extensions/browser/guest_view/web_view/web_view_guest.cc48
5 files changed, 46 insertions, 61 deletions
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 206a45b..64bcd90 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -96,14 +96,14 @@ bool AppViewGuest::CompletePendingRequest(
}
// static
-GuestViewBase* AppViewGuest::Create(content::WebContents* owner_web_contents) {
+GuestViewBase* AppViewGuest::Create(WebContents* owner_web_contents) {
return new AppViewGuest(owner_web_contents);
}
-AppViewGuest::AppViewGuest(content::WebContents* owner_web_contents)
+AppViewGuest::AppViewGuest(WebContents* owner_web_contents)
: GuestView<AppViewGuest>(owner_web_contents),
- app_view_guest_delegate_(
- ExtensionsAPIClient::Get()->CreateAppViewGuestDelegate()),
+ app_view_guest_delegate_(ExtensionsAPIClient::Get()
+ ->CreateAppViewGuestDelegate()),
weak_ptr_factory_(this) {
if (app_view_guest_delegate_)
app_delegate_.reset(app_view_guest_delegate_->CreateAppDelegate());
@@ -120,7 +120,7 @@ bool AppViewGuest::HandleContextMenu(const content::ContextMenuParams& params) {
}
void AppViewGuest::RequestMediaAccessPermission(
- content::WebContents* web_contents,
+ WebContents* web_contents,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
if (!app_delegate_) {
@@ -137,10 +137,9 @@ void AppViewGuest::RequestMediaAccessPermission(
guest_extension);
}
-bool AppViewGuest::CheckMediaAccessPermission(
- content::WebContents* web_contents,
- const GURL& security_origin,
- content::MediaStreamType type) {
+bool AppViewGuest::CheckMediaAccessPermission(WebContents* web_contents,
+ const GURL& security_origin,
+ content::MediaStreamType type) {
if (!app_delegate_) {
return WebContentsDelegate::CheckMediaAccessPermission(
web_contents, security_origin, type);
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 3b40a5d..cfdb5cf 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -38,20 +38,17 @@ namespace extensions {
// static
const char ExtensionOptionsGuest::Type[] = "extensionoptions";
-ExtensionOptionsGuest::ExtensionOptionsGuest(
- content::WebContents* owner_web_contents)
+ExtensionOptionsGuest::ExtensionOptionsGuest(WebContents* owner_web_contents)
: GuestView<ExtensionOptionsGuest>(owner_web_contents),
extension_options_guest_delegate_(
extensions::ExtensionsAPIClient::Get()
- ->CreateExtensionOptionsGuestDelegate(this)) {
-}
+ ->CreateExtensionOptionsGuestDelegate(this)) {}
ExtensionOptionsGuest::~ExtensionOptionsGuest() {
}
// static
-GuestViewBase* ExtensionOptionsGuest::Create(
- content::WebContents* owner_web_contents) {
+GuestViewBase* ExtensionOptionsGuest::Create(WebContents* owner_web_contents) {
return new ExtensionOptionsGuest(owner_web_contents);
}
@@ -155,8 +152,8 @@ bool ExtensionOptionsGuest::ShouldHandleFindRequestsForEmbedder() const {
return true;
}
-content::WebContents* ExtensionOptionsGuest::OpenURLFromTab(
- content::WebContents* source,
+WebContents* ExtensionOptionsGuest::OpenURLFromTab(
+ WebContents* source,
const content::OpenURLParams& params) {
if (!extension_options_guest_delegate_)
return nullptr;
@@ -177,7 +174,7 @@ content::WebContents* ExtensionOptionsGuest::OpenURLFromTab(
return extension_options_guest_delegate_->OpenURLInNewTab(params);
}
-void ExtensionOptionsGuest::CloseContents(content::WebContents* source) {
+void ExtensionOptionsGuest::CloseContents(WebContents* source) {
DispatchEventToView(
new GuestViewEvent(extension_options_internal::OnClose::kEventName,
make_scoped_ptr(new base::DictionaryValue())));
@@ -192,7 +189,7 @@ bool ExtensionOptionsGuest::HandleContextMenu(
}
bool ExtensionOptionsGuest::ShouldCreateWebContents(
- content::WebContents* web_contents,
+ WebContents* web_contents,
int route_id,
int main_frame_route_id,
WindowContainerType window_container_type,
diff --git a/extensions/browser/guest_view/extension_view/extension_view_guest.cc b/extensions/browser/guest_view/extension_view/extension_view_guest.cc
index 101f353..e000d6e 100644
--- a/extensions/browser/guest_view/extension_view/extension_view_guest.cc
+++ b/extensions/browser/guest_view/extension_view/extension_view_guest.cc
@@ -25,17 +25,14 @@ namespace extensions {
// static
const char ExtensionViewGuest::Type[] = "extensionview";
-ExtensionViewGuest::ExtensionViewGuest(
- content::WebContents* owner_web_contents)
- : GuestView<ExtensionViewGuest>(owner_web_contents) {
-}
+ExtensionViewGuest::ExtensionViewGuest(WebContents* owner_web_contents)
+ : GuestView<ExtensionViewGuest>(owner_web_contents) {}
ExtensionViewGuest::~ExtensionViewGuest() {
}
// static
-GuestViewBase* ExtensionViewGuest::Create(
- content::WebContents* owner_web_contents) {
+GuestViewBase* ExtensionViewGuest::Create(WebContents* owner_web_contents) {
return new ExtensionViewGuest(owner_web_contents);
}
@@ -116,7 +113,6 @@ int ExtensionViewGuest::GetTaskPrefix() const {
return IDS_EXTENSION_TASK_MANAGER_EXTENSIONVIEW_TAG_PREFIX;
}
-// content::WebContentsObserver implementation.
void ExtensionViewGuest::DidCommitProvisionalLoadForFrame(
content::RenderFrameHost* render_frame_host,
const GURL& url,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index f8db136..5cfc1ee 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -67,17 +67,14 @@ base::WeakPtr<StreamContainer> StreamContainer::GetWeakPtr() {
const char MimeHandlerViewGuest::Type[] = "mimehandler";
// static
-GuestViewBase* MimeHandlerViewGuest::Create(
- content::WebContents* owner_web_contents) {
+GuestViewBase* MimeHandlerViewGuest::Create(WebContents* owner_web_contents) {
return new MimeHandlerViewGuest(owner_web_contents);
}
-MimeHandlerViewGuest::MimeHandlerViewGuest(
- content::WebContents* owner_web_contents)
+MimeHandlerViewGuest::MimeHandlerViewGuest(WebContents* owner_web_contents)
: GuestView<MimeHandlerViewGuest>(owner_web_contents),
delegate_(ExtensionsAPIClient::Get()->CreateMimeHandlerViewGuestDelegate(
- this)) {
-}
+ this)) {}
MimeHandlerViewGuest::~MimeHandlerViewGuest() {
}
@@ -158,8 +155,8 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const {
return false;
}
-content::WebContents* MimeHandlerViewGuest::OpenURLFromTab(
- content::WebContents* source,
+WebContents* MimeHandlerViewGuest::OpenURLFromTab(
+ WebContents* source,
const content::OpenURLParams& params) {
return embedder_web_contents()->GetDelegate()->OpenURLFromTab(
embedder_web_contents(), params);
@@ -174,7 +171,7 @@ bool MimeHandlerViewGuest::HandleContextMenu(
}
bool MimeHandlerViewGuest::PreHandleGestureEvent(
- content::WebContents* source,
+ WebContents* source,
const blink::WebGestureEvent& event) {
if (event.type == blink::WebGestureEvent::GesturePinchBegin ||
event.type == blink::WebGestureEvent::GesturePinchUpdate ||
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index aea5054..6d3f617 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -236,7 +236,7 @@ void WebViewGuest::CleanUp(content::BrowserContext* browser_context,
}
// static
-GuestViewBase* WebViewGuest::Create(content::WebContents* owner_web_contents) {
+GuestViewBase* WebViewGuest::Create(WebContents* owner_web_contents) {
return new WebViewGuest(owner_web_contents);
}
@@ -540,13 +540,12 @@ void WebViewGuest::HandleKeyboardEvent(
GuestViewBase::HandleKeyboardEvent(source, event);
}
-bool WebViewGuest::PreHandleGestureEvent(content::WebContents* source,
+bool WebViewGuest::PreHandleGestureEvent(WebContents* source,
const blink::WebGestureEvent& event) {
return !allow_scaling_ && GuestViewBase::PreHandleGestureEvent(source, event);
}
-void WebViewGuest::LoadProgressChanged(content::WebContents* source,
- double progress) {
+void WebViewGuest::LoadProgressChanged(WebContents* source, double progress) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetString(guest_view::kUrl, web_contents()->GetURL().spec());
args->SetDouble(webview::kProgress, progress);
@@ -588,9 +587,8 @@ void WebViewGuest::CreateNewGuestWebViewWindow(
params));
}
-void WebViewGuest::NewGuestWebViewCallback(
- const content::OpenURLParams& params,
- content::WebContents* guest_web_contents) {
+void WebViewGuest::NewGuestWebViewCallback(const content::OpenURLParams& params,
+ WebContents* guest_web_contents) {
WebViewGuest* new_guest = WebViewGuest::FromWebContents(guest_web_contents);
new_guest->SetOpener(this);
@@ -607,7 +605,7 @@ void WebViewGuest::NewGuestWebViewCallback(
// TODO(fsamuel): Find a reliable way to test the 'responsive' and
// 'unresponsive' events.
-void WebViewGuest::RendererResponsive(content::WebContents* source) {
+void WebViewGuest::RendererResponsive(WebContents* source) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
web_contents()->GetRenderProcessHost()->GetID());
@@ -615,7 +613,7 @@ void WebViewGuest::RendererResponsive(content::WebContents* source) {
new GuestViewEvent(webview::kEventResponsive, args.Pass()));
}
-void WebViewGuest::RendererUnresponsive(content::WebContents* source) {
+void WebViewGuest::RendererUnresponsive(WebContents* source) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
web_contents()->GetRenderProcessHost()->GetID());
@@ -738,7 +736,7 @@ bool WebViewGuest::ClearData(base::Time remove_since,
return true;
}
-WebViewGuest::WebViewGuest(content::WebContents* owner_web_contents)
+WebViewGuest::WebViewGuest(WebContents* owner_web_contents)
: GuestView<WebViewGuest>(owner_web_contents),
rules_registry_id_(RulesRegistryService::kInvalidRulesRegistryID),
find_helper_(this),
@@ -923,7 +921,7 @@ void WebViewGuest::RemoveWebViewStateFromIOThread(
}
void WebViewGuest::RequestMediaAccessPermission(
- content::WebContents* source,
+ WebContents* source,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
web_view_permission_helper_->RequestMediaAccessPermission(source,
@@ -931,7 +929,7 @@ void WebViewGuest::RequestMediaAccessPermission(
callback);
}
-bool WebViewGuest::CheckMediaAccessPermission(content::WebContents* source,
+bool WebViewGuest::CheckMediaAccessPermission(WebContents* source,
const GURL& security_origin,
content::MediaStreamType type) {
return web_view_permission_helper_->CheckMediaAccessPermission(
@@ -1198,8 +1196,8 @@ bool WebViewGuest::LoadDataWithBaseURL(const std::string& data_url,
return true;
}
-void WebViewGuest::AddNewContents(content::WebContents* source,
- content::WebContents* new_contents,
+void WebViewGuest::AddNewContents(WebContents* source,
+ WebContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_rect,
bool user_gesture,
@@ -1212,8 +1210,8 @@ void WebViewGuest::AddNewContents(content::WebContents* source,
new_contents);
}
-content::WebContents* WebViewGuest::OpenURLFromTab(
- content::WebContents* source,
+WebContents* WebViewGuest::OpenURLFromTab(
+ WebContents* source,
const content::OpenURLParams& params) {
// Most navigations should be handled by WebViewGuest::LoadURLWithParams,
// which takes care of blocking chrome:// URLs and other web-unsafe schemes.
@@ -1280,7 +1278,7 @@ void WebViewGuest::WebContentsCreated(WebContents* source_contents,
int opener_render_frame_id,
const std::string& frame_name,
const GURL& target_url,
- content::WebContents* new_contents) {
+ WebContents* new_contents) {
auto guest = WebViewGuest::FromWebContents(new_contents);
CHECK(guest);
guest->SetOpener(this);
@@ -1289,7 +1287,7 @@ void WebViewGuest::WebContentsCreated(WebContents* source_contents,
std::make_pair(guest, NewWindowInfo(target_url, frame_name)));
}
-void WebViewGuest::EnterFullscreenModeForTab(content::WebContents* web_contents,
+void WebViewGuest::EnterFullscreenModeForTab(WebContents* web_contents,
const GURL& origin) {
// Ask the embedder for permission.
base::DictionaryValue request_info;
@@ -1309,13 +1307,12 @@ void WebViewGuest::EnterFullscreenModeForTab(content::WebContents* web_contents,
SetFullscreenState(true);
}
-void WebViewGuest::ExitFullscreenModeForTab(
- content::WebContents* web_contents) {
+void WebViewGuest::ExitFullscreenModeForTab(WebContents* web_contents) {
SetFullscreenState(false);
}
bool WebViewGuest::IsFullscreenForTabOrPending(
- const content::WebContents* web_contents) const {
+ const WebContents* web_contents) const {
return is_guest_fullscreen_;
}
@@ -1371,11 +1368,10 @@ void WebViewGuest::LoadURLWithParams(
src_ = validated_url;
}
-void WebViewGuest::RequestNewWindowPermission(
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_bounds,
- bool user_gesture,
- content::WebContents* new_contents) {
+void WebViewGuest::RequestNewWindowPermission(WindowOpenDisposition disposition,
+ const gfx::Rect& initial_bounds,
+ bool user_gesture,
+ WebContents* new_contents) {
auto guest = WebViewGuest::FromWebContents(new_contents);
if (!guest)
return;