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

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

Issue 293093010: Rename RenderProcessHost::IsGuest to RenderProcessHost::IsIsolatedGuest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_isguest_chrome_callsites
Patch Set: Addressed comments 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 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 "chrome/browser/guest_view/web_view/web_view_guest.h" 5 #include "chrome/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include "base/debug/stack_trace.h" 7 #include "base/debug/stack_trace.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/child_process_security_policy.h" 28 #include "content/public/browser/child_process_security_policy.h"
29 #include "content/public/browser/geolocation_permission_context.h" 29 #include "content/public/browser/geolocation_permission_context.h"
30 #include "content/public/browser/native_web_keyboard_event.h" 30 #include "content/public/browser/native_web_keyboard_event.h"
31 #include "content/public/browser/navigation_entry.h" 31 #include "content/public/browser/navigation_entry.h"
32 #include "content/public/browser/notification_details.h" 32 #include "content/public/browser/notification_details.h"
33 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
34 #include "content/public/browser/notification_source.h" 34 #include "content/public/browser/notification_source.h"
35 #include "content/public/browser/notification_types.h" 35 #include "content/public/browser/notification_types.h"
36 #include "content/public/browser/render_process_host.h" 36 #include "content/public/browser/render_process_host.h"
37 #include "content/public/browser/render_view_host.h"
37 #include "content/public/browser/resource_request_details.h" 38 #include "content/public/browser/resource_request_details.h"
38 #include "content/public/browser/site_instance.h" 39 #include "content/public/browser/site_instance.h"
39 #include "content/public/browser/storage_partition.h" 40 #include "content/public/browser/storage_partition.h"
40 #include "content/public/browser/user_metrics.h" 41 #include "content/public/browser/user_metrics.h"
41 #include "content/public/browser/web_contents.h" 42 #include "content/public/browser/web_contents.h"
42 #include "content/public/browser/web_contents_delegate.h" 43 #include "content/public/browser/web_contents_delegate.h"
43 #include "content/public/common/media_stream_request.h" 44 #include "content/public/common/media_stream_request.h"
44 #include "content/public/common/page_zoom.h" 45 #include "content/public/common/page_zoom.h"
45 #include "content/public/common/result_codes.h" 46 #include "content/public/common/result_codes.h"
46 #include "content/public/common/stop_find_action.h" 47 #include "content/public/common/stop_find_action.h"
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 if (!attached()) { 897 if (!attached()) {
897 // We cannot reload now because all resource loads are suspended until 898 // We cannot reload now because all resource loads are suspended until
898 // attachment. 899 // attachment.
899 pending_reload_on_attachment_ = true; 900 pending_reload_on_attachment_ = true;
900 return; 901 return;
901 } 902 }
902 guest_web_contents()->GetController().Reload(false); 903 guest_web_contents()->GetController().Reload(false);
903 } 904 }
904 905
905 void WebViewGuest::RenderViewReady() { 906 void WebViewGuest::RenderViewReady() {
907 // The guest RenderView should always live in an isolated guest process.
908 CHECK(guest_web_contents()->GetRenderProcessHost()->IsIsolatedGuest());
906 Send(new ChromeViewMsg_SetName(guest_web_contents()->GetRoutingID(), name_)); 909 Send(new ChromeViewMsg_SetName(guest_web_contents()->GetRoutingID(), name_));
907 } 910 }
908 911
909 void WebViewGuest::ReportFrameNameChange(const std::string& name) { 912 void WebViewGuest::ReportFrameNameChange(const std::string& name) {
910 name_ = name; 913 name_ = name;
911 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 914 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
912 args->SetString(webview::kName, name); 915 args->SetString(webview::kName, name);
913 DispatchEvent( 916 DispatchEvent(
914 new GuestViewBase::Event(webview::kEventFrameNameChanged, args.Pass())); 917 new GuestViewBase::Event(webview::kEventFrameNameChanged, args.Pass()));
915 } 918 }
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 bool allow, 1413 bool allow,
1411 const std::string& user_input) { 1414 const std::string& user_input) {
1412 WebViewGuest* guest = 1415 WebViewGuest* guest =
1413 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); 1416 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id);
1414 if (!guest) 1417 if (!guest)
1415 return; 1418 return;
1416 1419
1417 if (!allow) 1420 if (!allow)
1418 guest->Destroy(); 1421 guest->Destroy();
1419 } 1422 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698