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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 910073003: <webview>: Make contentWindow available prior to attachment (on display:none). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 9 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 "extensions/browser/guest_view/web_view/web_view_guest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 } 977 }
978 } 978 }
979 979
980 // Only read the src attribute if this is not a New Window API flow. 980 // Only read the src attribute if this is not a New Window API flow.
981 if (!is_pending_new_window) { 981 if (!is_pending_new_window) {
982 std::string src; 982 std::string src;
983 params.GetString(webview::kAttributeSrc, &src); 983 params.GetString(webview::kAttributeSrc, &src);
984 NavigateGuest(src, false /* force_navigation */); 984 NavigateGuest(src, false /* force_navigation */);
985 } 985 }
986 986
987 ignore_result(proxy_host()->GetGuestProxyRoutingID());
lfg 2015/03/05 22:14:00 Comment that this is here to create the RV.
Fady Samuel 2015/03/07 00:20:28 Removed.
987 } 988 }
988 989
989 void WebViewGuest::ShowContextMenu( 990 void WebViewGuest::ShowContextMenu(
990 int request_id, 991 int request_id,
991 const WebViewGuestDelegate::MenuItemVector* items) { 992 const WebViewGuestDelegate::MenuItemVector* items) {
992 if (web_view_guest_delegate_) 993 if (web_view_guest_delegate_)
993 web_view_guest_delegate_->OnShowContextMenu(request_id, items); 994 web_view_guest_delegate_->OnShowContextMenu(request_id, items);
994 } 995 }
995 996
996 void WebViewGuest::SetName(const std::string& name) { 997 void WebViewGuest::SetName(const std::string& name) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(), 1270 WebViewGuest::From(owner_web_contents()->GetRenderProcessHost()->GetID(),
1270 new_window_instance_id); 1271 new_window_instance_id);
1271 if (!guest) 1272 if (!guest)
1272 return; 1273 return;
1273 1274
1274 if (!allow) 1275 if (!allow)
1275 guest->Destroy(); 1276 guest->Destroy();
1276 } 1277 }
1277 1278
1278 } // namespace extensions 1279 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698