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

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

Issue 444813002: Remove BrowserPlugin's -internal-attach method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't crash on tear down Created 6 years, 4 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 cc241d9abfc6f7b11bd982e405a53304a92e77c0..98a606b615c2f775e9a2b6a0785677efe70ba07f 100644
--- a/chrome/browser/guest_view/web_view/web_view_guest.cc
+++ b/chrome/browser/guest_view/web_view/web_view_guest.cc
@@ -253,7 +253,7 @@ void WebViewGuest::DidAttachToEmbedder() {
SetUpAutoSize();
std::string name;
- if (extra_params()->GetString(webview::kName, &name)) {
+ if (attach_params()->GetString(webview::kName, &name)) {
// If the guest window's name is empty, then the WebView tag's name is
// assigned. Otherwise, the guest window's name takes precedence over the
// WebView tag's name.
@@ -263,15 +263,15 @@ void WebViewGuest::DidAttachToEmbedder() {
ReportFrameNameChange(name_);
std::string user_agent_override;
- if (extra_params()->GetString(webview::kParameterUserAgentOverride,
- &user_agent_override)) {
+ if (attach_params()->GetString(webview::kParameterUserAgentOverride,
+ &user_agent_override)) {
SetUserAgentOverride(user_agent_override);
} else {
SetUserAgentOverride("");
}
std::string src;
- if (extra_params()->GetString("src", &src) && !src.empty())
+ if (attach_params()->GetString("src", &src) && !src.empty())
NavigateGuest(src);
if (GetOpener()) {
@@ -935,17 +935,17 @@ bool WebViewGuest::HandleKeyboardShortcuts(
void WebViewGuest::SetUpAutoSize() {
// Read the autosize parameters passed in from the embedder.
bool auto_size_enabled = false;
- extra_params()->GetBoolean(webview::kAttributeAutoSize, &auto_size_enabled);
+ attach_params()->GetBoolean(webview::kAttributeAutoSize, &auto_size_enabled);
int max_height = 0;
int max_width = 0;
- extra_params()->GetInteger(webview::kAttributeMaxHeight, &max_height);
- extra_params()->GetInteger(webview::kAttributeMaxWidth, &max_width);
+ attach_params()->GetInteger(webview::kAttributeMaxHeight, &max_height);
+ attach_params()->GetInteger(webview::kAttributeMaxWidth, &max_width);
int min_height = 0;
int min_width = 0;
- extra_params()->GetInteger(webview::kAttributeMinHeight, &min_height);
- extra_params()->GetInteger(webview::kAttributeMinWidth, &min_width);
+ attach_params()->GetInteger(webview::kAttributeMinHeight, &min_height);
+ attach_params()->GetInteger(webview::kAttributeMinWidth, &min_width);
// Call SetAutoSize to apply all the appropriate validation and clipping of
// values.
@@ -1070,7 +1070,7 @@ void WebViewGuest::RequestNewWindowPermission(
request_info.Set(webview::kTargetURL,
new base::StringValue(new_window_info.url.spec()));
request_info.Set(webview::kName, new base::StringValue(new_window_info.name));
- request_info.SetInteger(webview::kWindowID, guest->GetGuestInstanceID());
+ request_info.SetInteger(webview::kWindowID, guest->guest_instance_id());
// We pass in partition info so that window-s created through newwindow
// API can use it to set their partition attribute.
request_info.Set(webview::kStoragePartitionId,
@@ -1084,7 +1084,7 @@ void WebViewGuest::RequestNewWindowPermission(
request_info,
base::Bind(&WebViewGuest::OnWebViewNewWindowResponse,
base::Unretained(this),
- guest->GetGuestInstanceID()),
+ guest->guest_instance_id()),
false /* allowed_by_default */);
}

Powered by Google App Engine
This is Rietveld 408576698