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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1255483004: Implement surface-based browser process hit testing for Mac and Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled test on Android (not implemented there) Created 5 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "content/browser/manifest/manifest_manager_host.h" 47 #include "content/browser/manifest/manifest_manager_host.h"
48 #include "content/browser/media/audio_stream_monitor.h" 48 #include "content/browser/media/audio_stream_monitor.h"
49 #include "content/browser/media/capture/web_contents_audio_muter.h" 49 #include "content/browser/media/capture/web_contents_audio_muter.h"
50 #include "content/browser/message_port_message_filter.h" 50 #include "content/browser/message_port_message_filter.h"
51 #include "content/browser/plugin_content_origin_whitelist.h" 51 #include "content/browser/plugin_content_origin_whitelist.h"
52 #include "content/browser/power_save_blocker_impl.h" 52 #include "content/browser/power_save_blocker_impl.h"
53 #include "content/browser/renderer_host/render_process_host_impl.h" 53 #include "content/browser/renderer_host/render_process_host_impl.h"
54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 54 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
55 #include "content/browser/renderer_host/render_view_host_impl.h" 55 #include "content/browser/renderer_host/render_view_host_impl.h"
56 #include "content/browser/renderer_host/render_widget_host_impl.h" 56 #include "content/browser/renderer_host/render_widget_host_impl.h"
57 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
57 #include "content/browser/renderer_host/render_widget_host_view_base.h" 58 #include "content/browser/renderer_host/render_widget_host_view_base.h"
58 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 59 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h"
59 #include "content/browser/site_instance_impl.h" 60 #include "content/browser/site_instance_impl.h"
60 #include "content/browser/web_contents/web_contents_view_guest.h" 61 #include "content/browser/web_contents/web_contents_view_guest.h"
61 #include "content/browser/webui/generic_handler.h" 62 #include "content/browser/webui/generic_handler.h"
62 #include "content/browser/webui/web_ui_controller_factory_registry.h" 63 #include "content/browser/webui/web_ui_controller_factory_registry.h"
63 #include "content/browser/webui/web_ui_impl.h" 64 #include "content/browser/webui/web_ui_impl.h"
64 #include "content/common/browser_plugin/browser_plugin_constants.h" 65 #include "content/common/browser_plugin/browser_plugin_constants.h"
65 #include "content/common/browser_plugin/browser_plugin_messages.h" 66 #include "content/common/browser_plugin/browser_plugin_messages.h"
66 #include "content/common/frame_messages.h" 67 #include "content/common/frame_messages.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 base::Bind(&WebContentsImpl::OnFrameRemoved, 410 base::Bind(&WebContentsImpl::OnFrameRemoved,
410 base::Unretained(this))); 411 base::Unretained(this)));
411 #if defined(ENABLE_BROWSER_CDMS) 412 #if defined(ENABLE_BROWSER_CDMS)
412 media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); 413 media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
413 #endif 414 #endif
414 } 415 }
415 416
416 WebContentsImpl::~WebContentsImpl() { 417 WebContentsImpl::~WebContentsImpl() {
417 is_being_destroyed_ = true; 418 is_being_destroyed_ = true;
418 419
420 rwh_input_event_router_.reset();
421
419 // Delete all RFH pending shutdown, which will lead the corresponding RVH to 422 // Delete all RFH pending shutdown, which will lead the corresponding RVH to
420 // shutdown and be deleted as well. 423 // shutdown and be deleted as well.
421 frame_tree_.ForEach( 424 frame_tree_.ForEach(
422 base::Bind(&RenderFrameHostManager::ClearRFHsPendingShutdown)); 425 base::Bind(&RenderFrameHostManager::ClearRFHsPendingShutdown));
423 426
424 ClearAllPowerSaveBlockers(); 427 ClearAllPowerSaveBlockers();
425 428
426 for (std::set<RenderWidgetHostImpl*>::iterator iter = 429 for (std::set<RenderWidgetHostImpl*>::iterator iter =
427 created_widgets_.begin(); iter != created_widgets_.end(); ++iter) { 430 created_widgets_.begin(); iter != created_widgets_.end(); ++iter) {
428 (*iter)->DetachDelegate(); 431 (*iter)->DetachDelegate();
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 } 1565 }
1563 #endif 1566 #endif
1564 return false; 1567 return false;
1565 } 1568 }
1566 1569
1567 bool WebContentsImpl::PreHandleGestureEvent( 1570 bool WebContentsImpl::PreHandleGestureEvent(
1568 const blink::WebGestureEvent& event) { 1571 const blink::WebGestureEvent& event) {
1569 return delegate_ && delegate_->PreHandleGestureEvent(this, event); 1572 return delegate_ && delegate_->PreHandleGestureEvent(this, event);
1570 } 1573 }
1571 1574
1575 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
1576 // Currently only supported in site per process mode (--site-per-process).
1577 if (!rwh_input_event_router_.get() && !is_being_destroyed_ &&
1578 SiteIsolationPolicy::AreCrossProcessFramesPossible())
1579 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter);
1580 return rwh_input_event_router_.get();
1581 }
1582
1572 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { 1583 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
1573 // This method is being called to enter renderer-initiated fullscreen mode. 1584 // This method is being called to enter renderer-initiated fullscreen mode.
1574 // Make sure any existing fullscreen widget is shut down first. 1585 // Make sure any existing fullscreen widget is shut down first.
1575 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView(); 1586 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView();
1576 if (widget_view) 1587 if (widget_view)
1577 RenderWidgetHostImpl::From(widget_view->GetRenderWidgetHost())->Shutdown(); 1588 RenderWidgetHostImpl::From(widget_view->GetRenderWidgetHost())->Shutdown();
1578 1589
1579 if (delegate_) 1590 if (delegate_)
1580 delegate_->EnterFullscreenModeForTab(this, origin); 1591 delegate_->EnterFullscreenModeForTab(this, origin);
1581 1592
(...skipping 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 player_map->erase(it); 4620 player_map->erase(it);
4610 } 4621 }
4611 4622
4612 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4623 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4613 force_disable_overscroll_content_ = force_disable; 4624 force_disable_overscroll_content_ = force_disable;
4614 if (view_) 4625 if (view_)
4615 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4626 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4616 } 4627 }
4617 4628
4618 } // namespace content 4629 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698