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

Unified Diff: chrome/browser/guest_view/web_view/web_view_guest.cc

Issue 295083002: BrowserPluginGuest is no longer a WebContentsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_context_menu_easier_to_refactor
Patch Set: Fixed content_browsertests Created 6 years, 7 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: chrome/browser/guest_view/web_view/web_view_guest.cc
diff --git a/chrome/browser/guest_view/web_view/web_view_guest.cc b/chrome/browser/guest_view/web_view/web_view_guest.cc
index 9f9ea466b834bb7667ae8d76cd3b6dcf6b5638ab..3286f09b41a09e63a7dd305bf6e59110523b3ef6 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.cc
+++ b/chrome/browser/guest_view/web_view/web_view_guest.cc
@@ -355,7 +355,8 @@ bool WebViewGuest::HandleContextMenu(
return true;
}
-void WebViewGuest::AddMessageToConsole(int32 level,
+bool WebViewGuest::AddMessageToConsole(WebContents* source,
+ int32 level,
const base::string16& message,
int32 line_no,
const base::string16& source_id) {
@@ -367,9 +368,10 @@ void WebViewGuest::AddMessageToConsole(int32 level,
args->SetString(webview::kSourceId, source_id);
DispatchEvent(
new GuestViewBase::Event(webview::kEventConsoleMessage, args.Pass()));
+ return true;
}
-void WebViewGuest::Close() {
+void WebViewGuest::CloseContents(WebContents* source) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
DispatchEvent(new GuestViewBase::Event(webview::kEventClose, args.Pass()));
}
@@ -418,7 +420,8 @@ void WebViewGuest::EmbedderDestroyed() {
view_instance_id()));
}
-void WebViewGuest::FindReply(int request_id,
+void WebViewGuest::FindReply(WebContents* source,
+ int request_id,
int number_of_matches,
const gfx::Rect& selection_rect,
int active_match_ordinal,
@@ -439,6 +442,7 @@ void WebViewGuest::GuestProcessGone(base::TerminationStatus status) {
}
void WebViewGuest::HandleKeyboardEvent(
+ WebContents* source,
const content::NativeWebKeyboardEvent& event) {
if (!attached())
return;
@@ -460,7 +464,8 @@ bool WebViewGuest::IsDragAndDropEnabled() {
return true;
}
-void WebViewGuest::LoadProgressed(double progress) {
+void WebViewGuest::LoadProgressChanged(content::WebContents* source,
+ double progress) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetString(guestview::kUrl, guest_web_contents()->GetURL().spec());
args->SetDouble(webview::kProgress, progress);
@@ -492,7 +497,6 @@ void WebViewGuest::OnUpdateFrameName(bool is_top_level,
WebViewGuest* WebViewGuest::CreateNewGuestWindow(
const content::OpenURLParams& params) {
-
GuestViewManager* guest_manager =
GuestViewManager::FromBrowserContext(browser_context());
// Allocate a new instance ID for the new guest.
@@ -531,7 +535,7 @@ WebViewGuest* WebViewGuest::CreateNewGuestWindow(
// TODO(fsamuel): Find a reliable way to test the 'responsive' and
// 'unresponsive' events.
-void WebViewGuest::RendererResponsive() {
+void WebViewGuest::RendererResponsive(content::WebContents* source) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
guest_web_contents()->GetRenderProcessHost()->GetID());
@@ -539,7 +543,7 @@ void WebViewGuest::RendererResponsive() {
new GuestViewBase::Event(webview::kEventResponsive, args.Pass()));
}
-void WebViewGuest::RendererUnresponsive() {
+void WebViewGuest::RendererUnresponsive(content::WebContents* source) {
scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
args->SetInteger(webview::kProcessId,
guest_web_contents()->GetRenderProcessHost()->GetID());
@@ -979,6 +983,7 @@ void WebViewGuest::SizeChanged(const gfx::Size& old_size,
}
void WebViewGuest::RequestMediaAccessPermission(
+ content::WebContents* source,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
base::DictionaryValue request_info;
@@ -995,8 +1000,9 @@ void WebViewGuest::RequestMediaAccessPermission(
}
void WebViewGuest::CanDownload(
- const std::string& request_method,
+ content::RenderViewHost* render_view_host,
const GURL& url,
+ const std::string& request_method,
const base::Callback<void(bool)>& callback) {
base::DictionaryValue request_info;
request_info.Set(

Powered by Google App Engine
This is Rietveld 408576698