| 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 883 |
| 884 // Send the new override string to the renderer. | 884 // Send the new override string to the renderer. |
| 885 RenderViewHost* host = GetRenderViewHost(); | 885 RenderViewHost* host = GetRenderViewHost(); |
| 886 if (host) | 886 if (host) |
| 887 host->SyncRendererPrefs(); | 887 host->SyncRendererPrefs(); |
| 888 | 888 |
| 889 // Reload the page if a load is currently in progress to avoid having | 889 // Reload the page if a load is currently in progress to avoid having |
| 890 // different parts of the page loaded using different user agents. | 890 // different parts of the page loaded using different user agents. |
| 891 NavigationEntry* entry = controller_.GetVisibleEntry(); | 891 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 892 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) | 892 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) |
| 893 controller_.ReloadIgnoringCache(true); | 893 controller_.ReloadBypassingCache(true); |
| 894 | 894 |
| 895 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 895 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 896 UserAgentOverrideSet(override)); | 896 UserAgentOverrideSet(override)); |
| 897 } | 897 } |
| 898 | 898 |
| 899 const std::string& WebContentsImpl::GetUserAgentOverride() const { | 899 const std::string& WebContentsImpl::GetUserAgentOverride() const { |
| 900 return renderer_preferences_.user_agent_override; | 900 return renderer_preferences_.user_agent_override; |
| 901 } | 901 } |
| 902 | 902 |
| 903 void WebContentsImpl::EnableTreeOnlyAccessibilityMode() { | 903 void WebContentsImpl::EnableTreeOnlyAccessibilityMode() { |
| (...skipping 3932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4836 else | 4836 else |
| 4837 WasHidden(); | 4837 WasHidden(); |
| 4838 } | 4838 } |
| 4839 | 4839 |
| 4840 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4840 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 4841 JavaScriptDialogManager* dialog_manager) { | 4841 JavaScriptDialogManager* dialog_manager) { |
| 4842 dialog_manager_ = dialog_manager; | 4842 dialog_manager_ = dialog_manager; |
| 4843 } | 4843 } |
| 4844 | 4844 |
| 4845 } // namespace content | 4845 } // namespace content |
| OLD | NEW |