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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Disable BrowserPluginHostTest.NavigateGuest on win, flaking. Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "content/browser/child_process_security_policy_impl.h" 22 #include "content/browser/child_process_security_policy_impl.h"
23 #include "content/browser/cross_site_request_manager.h" 23 #include "content/browser/cross_site_request_manager.h"
24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 24 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
25 #include "content/browser/gpu/gpu_surface_tracker.h" 25 #include "content/browser/gpu/gpu_surface_tracker.h"
26 #include "content/browser/host_zoom_map_impl.h" 26 #include "content/browser/host_zoom_map_impl.h"
27 #include "content/browser/power_save_blocker.h" 27 #include "content/browser/power_save_blocker.h"
28 #include "content/browser/renderer_host/dip_util.h" 28 #include "content/browser/renderer_host/dip_util.h"
29 #include "content/browser/renderer_host/render_process_host_impl.h" 29 #include "content/browser/renderer_host/render_process_host_impl.h"
30 #include "content/browser/renderer_host/render_view_host_delegate.h" 30 #include "content/browser/renderer_host/render_view_host_delegate.h"
31 #include "content/common/accessibility_messages.h" 31 #include "content/common/accessibility_messages.h"
32 #include "content/common/browser_plugin_messages.h"
32 #include "content/common/content_constants_internal.h" 33 #include "content/common/content_constants_internal.h"
33 #include "content/common/desktop_notification_messages.h" 34 #include "content/common/desktop_notification_messages.h"
34 #include "content/common/drag_messages.h" 35 #include "content/common/drag_messages.h"
35 #include "content/common/inter_process_time_ticks_converter.h" 36 #include "content/common/inter_process_time_ticks_converter.h"
36 #include "content/common/speech_recognition_messages.h" 37 #include "content/common/speech_recognition_messages.h"
37 #include "content/common/swapped_out_messages.h" 38 #include "content/common/swapped_out_messages.h"
38 #include "content/common/view_messages.h" 39 #include "content/common/view_messages.h"
39 #include "content/port/browser/render_view_host_delegate_view.h" 40 #include "content/port/browser/render_view_host_delegate_view.h"
40 #include "content/port/browser/render_widget_host_view_port.h" 41 #include "content/port/browser/render_widget_host_view_port.h"
41 #include "content/public/browser/browser_accessibility_state.h" 42 #include "content/public/browser/browser_accessibility_state.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 827
827 bool RenderViewHostImpl::SuddenTerminationAllowed() const { 828 bool RenderViewHostImpl::SuddenTerminationAllowed() const {
828 return sudden_termination_allowed_ || 829 return sudden_termination_allowed_ ||
829 GetProcess()->SuddenTerminationAllowed(); 830 GetProcess()->SuddenTerminationAllowed();
830 } 831 }
831 832
832 /////////////////////////////////////////////////////////////////////////////// 833 ///////////////////////////////////////////////////////////////////////////////
833 // RenderViewHostImpl, IPC message handlers: 834 // RenderViewHostImpl, IPC message handlers:
834 835
835 bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) { 836 bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
836 if (!BrowserMessageFilter::CheckCanDispatchOnUI(msg, this)) 837 // Allow BrowserPluginHostMsg_* sync messages to run on the UI thread.
838 // Platform apps will not support windowed plugins so the deadlock cycle
839 // browser -> plugin -> renderer -> browser referred in
840 // BrowserMessageFilter::CheckCanDispatchOnUI() is not supposed to happen. If
841 // we want to support windowed plugins, sync messages in BrowserPlugin might
842 // need to be changed to async messages.
843 // TODO(fsamuel): Disallow BrowserPluginHostMsg_* sync messages to run on UI
844 // thread and make these messages async: http://crbug.com/149063.
845 if (msg.type() != BrowserPluginHostMsg_HandleInputEvent::ID &&
846 msg.type() != BrowserPluginHostMsg_ResizeGuest::ID &&
847 !BrowserMessageFilter::CheckCanDispatchOnUI(msg, this))
837 return true; 848 return true;
838 849
839 // Filter out most IPC messages if this renderer is swapped out. 850 // Filter out most IPC messages if this renderer is swapped out.
840 // We still want to handle certain ACKs to keep our state consistent. 851 // We still want to handle certain ACKs to keep our state consistent.
841 if (is_swapped_out_) { 852 if (is_swapped_out_) {
842 if (!content::SwappedOutMessages::CanHandleWhileSwappedOut(msg)) { 853 if (!content::SwappedOutMessages::CanHandleWhileSwappedOut(msg)) {
843 // If this is a synchronous message and we decided not to handle it, 854 // If this is a synchronous message and we decided not to handle it,
844 // we must send an error reply, or else the renderer will be stuck 855 // we must send an error reply, or else the renderer will be stuck
845 // and won't respond to future requests. 856 // and won't respond to future requests.
846 if (msg.is_sync()) { 857 if (msg.is_sync()) {
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 // can cause navigations to be ignored in OnMsgNavigate. 1938 // can cause navigations to be ignored in OnMsgNavigate.
1928 is_waiting_for_beforeunload_ack_ = false; 1939 is_waiting_for_beforeunload_ack_ = false;
1929 is_waiting_for_unload_ack_ = false; 1940 is_waiting_for_unload_ack_ = false;
1930 } 1941 }
1931 1942
1932 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1943 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1933 STLDeleteValues(&power_save_blockers_); 1944 STLDeleteValues(&power_save_blockers_);
1934 } 1945 }
1935 1946
1936 } // namespace content 1947 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/test_browser_plugin_guest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698