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

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

Issue 1785953002: Ignore viewport meta tags when Request Desktop Site is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::set Created 4 years, 8 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/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 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 } 2179 }
2180 2180
2181 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) { 2181 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) {
2182 virtual_keyboard_requested_ = requested; 2182 virtual_keyboard_requested_ = requested;
2183 } 2183 }
2184 2184
2185 bool WebContentsImpl::IsVirtualKeyboardRequested() { 2185 bool WebContentsImpl::IsVirtualKeyboardRequested() {
2186 return virtual_keyboard_requested_; 2186 return virtual_keyboard_requested_;
2187 } 2187 }
2188 2188
2189 bool WebContentsImpl::IsOverridingUserAgent() {
2190 return GetController().GetVisibleEntry() &&
2191 GetController().GetVisibleEntry()->GetIsOverridingUserAgent();
2192 }
2193
2189 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { 2194 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const {
2190 return accessibility_mode_; 2195 return accessibility_mode_;
2191 } 2196 }
2192 2197
2193 void WebContentsImpl::AccessibilityEventReceived( 2198 void WebContentsImpl::AccessibilityEventReceived(
2194 const std::vector<AXEventNotificationDetails>& details) { 2199 const std::vector<AXEventNotificationDetails>& details) {
2195 FOR_EACH_OBSERVER( 2200 FOR_EACH_OBSERVER(
2196 WebContentsObserver, observers_, AccessibilityEventReceived(details)); 2201 WebContentsObserver, observers_, AccessibilityEventReceived(details));
2197 } 2202 }
2198 2203
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4883 } 4888 }
4884 if (visible == should_normally_be_visible_) 4889 if (visible == should_normally_be_visible_)
4885 return; 4890 return;
4886 4891
4887 if (visible) 4892 if (visible)
4888 WasShown(); 4893 WasShown();
4889 else 4894 else
4890 WasHidden(); 4895 WasHidden();
4891 } 4896 }
4892 4897
4898 void WebContentsImpl::UpdateOverridingUserAgent() {
4899 std::set<RenderViewHost*> render_view_host_set;
4900 for (FrameTreeNode* node : frame_tree_.Nodes())
nasko 2016/04/09 00:02:26 Multiline for loop should have {}.
4901 if (RenderWidgetHost* render_widget_host =
nasko 2016/04/09 00:02:26 Style in this file is to have variable declaration
4902 node->current_frame_host()->GetRenderWidgetHost())
4903 if (RenderViewHost* render_view_host =
4904 RenderViewHost::From(render_widget_host))
4905 render_view_host_set.insert(render_view_host);
4906 for (RenderViewHost* render_view_host : render_view_host_set)
4907 render_view_host->OnWebkitPreferencesChanged();
4908 }
4909
4893 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4910 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4894 JavaScriptDialogManager* dialog_manager) { 4911 JavaScriptDialogManager* dialog_manager) {
4895 dialog_manager_ = dialog_manager; 4912 dialog_manager_ = dialog_manager;
4896 } 4913 }
4897 4914
4898 } // namespace content 4915 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698