OLD | NEW |
---|---|
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 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2169 } | 2169 } |
2170 | 2170 |
2171 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) { | 2171 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) { |
2172 virtual_keyboard_requested_ = requested; | 2172 virtual_keyboard_requested_ = requested; |
2173 } | 2173 } |
2174 | 2174 |
2175 bool WebContentsImpl::IsVirtualKeyboardRequested() { | 2175 bool WebContentsImpl::IsVirtualKeyboardRequested() { |
2176 return virtual_keyboard_requested_; | 2176 return virtual_keyboard_requested_; |
2177 } | 2177 } |
2178 | 2178 |
2179 bool WebContentsImpl::IsOverridingUserAgent() { | |
2180 return GetController().GetVisibleEntry() && | |
2181 GetController().GetVisibleEntry()->GetIsOverridingUserAgent(); | |
2182 } | |
2183 | |
2179 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { | 2184 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { |
2180 return accessibility_mode_; | 2185 return accessibility_mode_; |
2181 } | 2186 } |
2182 | 2187 |
2183 void WebContentsImpl::AccessibilityEventReceived( | 2188 void WebContentsImpl::AccessibilityEventReceived( |
2184 const std::vector<AXEventNotificationDetails>& details) { | 2189 const std::vector<AXEventNotificationDetails>& details) { |
2185 FOR_EACH_OBSERVER( | 2190 FOR_EACH_OBSERVER( |
2186 WebContentsObserver, observers_, AccessibilityEventReceived(details)); | 2191 WebContentsObserver, observers_, AccessibilityEventReceived(details)); |
2187 } | 2192 } |
2188 | 2193 |
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4840 } | 4845 } |
4841 if (visible == should_normally_be_visible_) | 4846 if (visible == should_normally_be_visible_) |
4842 return; | 4847 return; |
4843 | 4848 |
4844 if (visible) | 4849 if (visible) |
4845 WasShown(); | 4850 WasShown(); |
4846 else | 4851 else |
4847 WasHidden(); | 4852 WasHidden(); |
4848 } | 4853 } |
4849 | 4854 |
4855 void WebContentsImpl::UpdateOverridingUserAgent() { | |
4856 for (FrameTreeNode* node : frame_tree_.Nodes()) { | |
4857 RenderWidgetHost* render_widget_host = | |
4858 node->current_frame_host()->GetRenderWidgetHost(); | |
4859 if (!render_widget_host) | |
4860 continue; | |
4861 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | |
4862 if (!render_view_host) | |
4863 continue; | |
4864 render_view_host->OnWebkitPreferencesChanged(); | |
nasko
2016/04/08 22:32:35
It will be more efficient to add the RenderViewHos
aelias_OOO_until_Jul13
2016/04/08 23:31:36
Done.
| |
4865 } | |
4866 } | |
4867 | |
4850 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4868 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
4851 JavaScriptDialogManager* dialog_manager) { | 4869 JavaScriptDialogManager* dialog_manager) { |
4852 dialog_manager_ = dialog_manager; | 4870 dialog_manager_ = dialog_manager; |
4853 } | 4871 } |
4854 | 4872 |
4855 } // namespace content | 4873 } // namespace content |
OLD | NEW |