| 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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 } | 2160 } |
| 2161 | 2161 |
| 2162 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) { | 2162 void WebContentsImpl::SetIsVirtualKeyboardRequested(bool requested) { |
| 2163 virtual_keyboard_requested_ = requested; | 2163 virtual_keyboard_requested_ = requested; |
| 2164 } | 2164 } |
| 2165 | 2165 |
| 2166 bool WebContentsImpl::IsVirtualKeyboardRequested() { | 2166 bool WebContentsImpl::IsVirtualKeyboardRequested() { |
| 2167 return virtual_keyboard_requested_; | 2167 return virtual_keyboard_requested_; |
| 2168 } | 2168 } |
| 2169 | 2169 |
| 2170 bool WebContentsImpl::IsOverridingUserAgent() { |
| 2171 return GetController().GetVisibleEntry() && |
| 2172 GetController().GetVisibleEntry()->GetIsOverridingUserAgent(); |
| 2173 } |
| 2174 |
| 2170 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { | 2175 AccessibilityMode WebContentsImpl::GetAccessibilityMode() const { |
| 2171 return accessibility_mode_; | 2176 return accessibility_mode_; |
| 2172 } | 2177 } |
| 2173 | 2178 |
| 2174 void WebContentsImpl::AccessibilityEventReceived( | 2179 void WebContentsImpl::AccessibilityEventReceived( |
| 2175 const std::vector<AXEventNotificationDetails>& details) { | 2180 const std::vector<AXEventNotificationDetails>& details) { |
| 2176 FOR_EACH_OBSERVER( | 2181 FOR_EACH_OBSERVER( |
| 2177 WebContentsObserver, observers_, AccessibilityEventReceived(details)); | 2182 WebContentsObserver, observers_, AccessibilityEventReceived(details)); |
| 2178 } | 2183 } |
| 2179 | 2184 |
| (...skipping 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4848 } | 4853 } |
| 4849 if (visible == should_normally_be_visible_) | 4854 if (visible == should_normally_be_visible_) |
| 4850 return; | 4855 return; |
| 4851 | 4856 |
| 4852 if (visible) | 4857 if (visible) |
| 4853 WasShown(); | 4858 WasShown(); |
| 4854 else | 4859 else |
| 4855 WasHidden(); | 4860 WasHidden(); |
| 4856 } | 4861 } |
| 4857 | 4862 |
| 4863 void WebContentsImpl::UpdateOverridingUserAgent() { |
| 4864 GetRenderViewHost()->OnWebkitPreferencesChanged(); |
| 4865 } |
| 4866 |
| 4858 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4867 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 4859 JavaScriptDialogManager* dialog_manager) { | 4868 JavaScriptDialogManager* dialog_manager) { |
| 4860 dialog_manager_ = dialog_manager; | 4869 dialog_manager_ = dialog_manager; |
| 4861 } | 4870 } |
| 4862 | 4871 |
| 4863 } // namespace content | 4872 } // namespace content |
| OLD | NEW |