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

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

Issue 1394383002: OOPIF: Send page-level focus messages to all processes rendering a page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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/renderer/render_frame_proxy.h » ('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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 } 1573 }
1574 1574
1575 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { 1575 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() {
1576 // Currently only supported in site per process mode (--site-per-process). 1576 // Currently only supported in site per process mode (--site-per-process).
1577 if (!rwh_input_event_router_.get() && !is_being_destroyed_ && 1577 if (!rwh_input_event_router_.get() && !is_being_destroyed_ &&
1578 SiteIsolationPolicy::AreCrossProcessFramesPossible()) 1578 SiteIsolationPolicy::AreCrossProcessFramesPossible())
1579 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); 1579 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter);
1580 return rwh_input_event_router_.get(); 1580 return rwh_input_event_router_.get();
1581 } 1581 }
1582 1582
1583 void WebContentsImpl::ReplicatePageFocus(bool is_focused) {
1584 // Focus loss may occur while this WebContents is being destroyed. Don't
1585 // send the message in this case, as the main frame's RenderFrameHost and
1586 // other state has already been cleared.
1587 if (is_being_destroyed_)
1588 return;
1589
1590 frame_tree_.ReplicatePageFocus(is_focused);
1591 }
1592
1583 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { 1593 void WebContentsImpl::EnterFullscreenMode(const GURL& origin) {
1584 // This method is being called to enter renderer-initiated fullscreen mode. 1594 // This method is being called to enter renderer-initiated fullscreen mode.
1585 // Make sure any existing fullscreen widget is shut down first. 1595 // Make sure any existing fullscreen widget is shut down first.
1586 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView(); 1596 RenderWidgetHostView* const widget_view = GetFullscreenRenderWidgetHostView();
1587 if (widget_view) 1597 if (widget_view)
1588 RenderWidgetHostImpl::From(widget_view->GetRenderWidgetHost())->Shutdown(); 1598 RenderWidgetHostImpl::From(widget_view->GetRenderWidgetHost())->Shutdown();
1589 1599
1590 if (delegate_) 1600 if (delegate_)
1591 delegate_->EnterFullscreenModeForTab(this, origin); 1601 delegate_->EnterFullscreenModeForTab(this, origin);
1592 1602
(...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after
4640 return NULL; 4650 return NULL;
4641 } 4651 }
4642 4652
4643 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4653 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4644 force_disable_overscroll_content_ = force_disable; 4654 force_disable_overscroll_content_ = force_disable;
4645 if (view_) 4655 if (view_)
4646 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4656 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4647 } 4657 }
4648 4658
4649 } // namespace content 4659 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698