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

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

Issue 2916703002: Force resize event to be sent to OOPIF subframes when main frame resizes. (Closed)
Patch Set: add comment Created 3 years, 6 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/screen_orientation/screen_orientation_browsertest.cc ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 RenderWidgetHostImpl* render_widget_host, 1874 RenderWidgetHostImpl* render_widget_host,
1875 bool width_changed) { 1875 bool width_changed) {
1876 RenderFrameHostImpl* rfh = GetMainFrame(); 1876 RenderFrameHostImpl* rfh = GetMainFrame();
1877 if (!rfh || render_widget_host != rfh->GetRenderWidgetHost()) 1877 if (!rfh || render_widget_host != rfh->GetRenderWidgetHost())
1878 return; 1878 return;
1879 1879
1880 ScreenInfo screen_info; 1880 ScreenInfo screen_info;
1881 GetScreenInfo(&screen_info); 1881 GetScreenInfo(&screen_info);
1882 SendPageMessage(new PageMsg_UpdateScreenInfo(MSG_ROUTING_NONE, screen_info)); 1882 SendPageMessage(new PageMsg_UpdateScreenInfo(MSG_ROUTING_NONE, screen_info));
1883 1883
1884 // Send resize message to subframes.
1885 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) {
1886 if (view != rfh->GetView())
1887 view->GetRenderWidgetHost()->WasResized();
1888 }
1889
1884 for (auto& observer : observers_) 1890 for (auto& observer : observers_)
1885 observer.MainFrameWasResized(width_changed); 1891 observer.MainFrameWasResized(width_changed);
1886 } 1892 }
1887 1893
1888 void WebContentsImpl::ScreenInfoChanged() { 1894 void WebContentsImpl::ScreenInfoChanged() {
1889 if (browser_plugin_embedder_) 1895 if (browser_plugin_embedder_)
1890 browser_plugin_embedder_->ScreenInfoChanged(); 1896 browser_plugin_embedder_->ScreenInfoChanged();
1891 } 1897 }
1892 1898
1893 KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( 1899 KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
(...skipping 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after
5708 new_root->SetOriginalOpener(opener->frame_tree()->root()); 5714 new_root->SetOriginalOpener(opener->frame_tree()->root());
5709 5715
5710 if (!opener_suppressed) { 5716 if (!opener_suppressed) {
5711 new_root->SetOpener(opener); 5717 new_root->SetOpener(opener);
5712 created_with_opener_ = true; 5718 created_with_opener_ = true;
5713 } 5719 }
5714 } 5720 }
5715 } 5721 }
5716 5722
5717 } // namespace content 5723 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/screen_orientation/screen_orientation_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698