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

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

Issue 1412923009: Route touch-events for WebViewGuest directly to guest renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments (saving first this time). Created 5 years 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/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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 #endif 1588 #endif
1589 return false; 1589 return false;
1590 } 1590 }
1591 1591
1592 bool WebContentsImpl::PreHandleGestureEvent( 1592 bool WebContentsImpl::PreHandleGestureEvent(
1593 const blink::WebGestureEvent& event) { 1593 const blink::WebGestureEvent& event) {
1594 return delegate_ && delegate_->PreHandleGestureEvent(this, event); 1594 return delegate_ && delegate_->PreHandleGestureEvent(this, event);
1595 } 1595 }
1596 1596
1597 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { 1597 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
1598 // Currently only supported in site per process mode (--site-per-process). 1598 if (!is_being_destroyed_ && GetOuterWebContents())
1599 if (!rwh_input_event_router_.get() && !is_being_destroyed_ && 1599 return GetOuterWebContents()->GetInputEventRouter();
1600 SiteIsolationPolicy::AreCrossProcessFramesPossible()) 1600
1601 if (!rwh_input_event_router_.get() && !is_being_destroyed_)
1601 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); 1602 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter);
1602 return rwh_input_event_router_.get(); 1603 return rwh_input_event_router_.get();
1603 } 1604 }
1604 1605
1605 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { 1606 void WebContentsImpl::ReplicatePageFocus(bool is_focused) {
1606 // Focus loss may occur while this WebContents is being destroyed. Don't 1607 // Focus loss may occur while this WebContents is being destroyed. Don't
1607 // send the message in this case, as the main frame's RenderFrameHost and 1608 // send the message in this case, as the main frame's RenderFrameHost and
1608 // other state has already been cleared. 1609 // other state has already been cleared.
1609 if (is_being_destroyed_) 1610 if (is_being_destroyed_)
1610 return; 1611 return;
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
4707 const WebContentsObserver::MediaPlayerId& id) { 4708 const WebContentsObserver::MediaPlayerId& id) {
4708 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); 4709 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id));
4709 } 4710 }
4710 4711
4711 void WebContentsImpl::MediaStoppedPlaying( 4712 void WebContentsImpl::MediaStoppedPlaying(
4712 const WebContentsObserver::MediaPlayerId& id) { 4713 const WebContentsObserver::MediaPlayerId& id) {
4713 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4714 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4714 } 4715 }
4715 4716
4716 } // namespace content 4717 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698