| 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 | 1068 |
| 1069 for (auto& observer : observers_) | 1069 for (auto& observer : observers_) |
| 1070 observer.UserAgentOverrideSet(override); | 1070 observer.UserAgentOverrideSet(override); |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 const std::string& WebContentsImpl::GetUserAgentOverride() const { | 1073 const std::string& WebContentsImpl::GetUserAgentOverride() const { |
| 1074 return renderer_preferences_.user_agent_override; | 1074 return renderer_preferences_.user_agent_override; |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 void WebContentsImpl::EnableWebContentsOnlyAccessibilityMode() { | 1077 void WebContentsImpl::EnableWebContentsOnlyAccessibilityMode() { |
| 1078 if (GetAccessibilityMode() != AccessibilityModeOff) { | 1078 if (GetAccessibilityMode() != AccessibilityMode::OFF) { |
| 1079 for (RenderFrameHost* rfh : GetAllFrames()) | 1079 for (RenderFrameHost* rfh : GetAllFrames()) |
| 1080 ResetAccessibility(rfh); | 1080 ResetAccessibility(rfh); |
| 1081 } else { | 1081 } else { |
| 1082 AddAccessibilityMode(ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY); | 1082 AddAccessibilityMode(AccessibilityMode::WEB_CONTENTS_ONLY); |
| 1083 } | 1083 } |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 bool WebContentsImpl::IsWebContentsOnlyAccessibilityModeForTesting() const { | 1086 bool WebContentsImpl::IsWebContentsOnlyAccessibilityModeForTesting() const { |
| 1087 return accessibility_mode_ == ACCESSIBILITY_MODE_WEB_CONTENTS_ONLY; | 1087 return accessibility_mode_ == AccessibilityMode::WEB_CONTENTS_ONLY; |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 bool WebContentsImpl::IsFullAccessibilityModeForTesting() const { | 1090 bool WebContentsImpl::IsFullAccessibilityModeForTesting() const { |
| 1091 return accessibility_mode_ == ACCESSIBILITY_MODE_COMPLETE; | 1091 return accessibility_mode_ == AccessibilityMode::COMPLETE; |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 const PageImportanceSignals& WebContentsImpl::GetPageImportanceSignals() const { | 1094 const PageImportanceSignals& WebContentsImpl::GetPageImportanceSignals() const { |
| 1095 return page_importance_signals_; | 1095 return page_importance_signals_; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 const base::string16& WebContentsImpl::GetTitle() const { | 1098 const base::string16& WebContentsImpl::GetTitle() const { |
| 1099 // Transient entries take precedence. They are used for interstitial pages | 1099 // Transient entries take precedence. They are used for interstitial pages |
| 1100 // that are shown on top of existing pages. | 1100 // that are shown on top of existing pages. |
| 1101 NavigationEntry* entry = controller_.GetTransientEntry(); | 1101 NavigationEntry* entry = controller_.GetTransientEntry(); |
| (...skipping 4294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5396 GetMainFrame()->AddMessageToConsole( | 5396 GetMainFrame()->AddMessageToConsole( |
| 5397 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5397 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5398 base::StringPrintf("This site does not have a valid SSL " | 5398 base::StringPrintf("This site does not have a valid SSL " |
| 5399 "certificate! Without SSL, your site's and " | 5399 "certificate! Without SSL, your site's and " |
| 5400 "visitors' data is vulnerable to theft and " | 5400 "visitors' data is vulnerable to theft and " |
| 5401 "tampering. Get a valid SSL certificate before" | 5401 "tampering. Get a valid SSL certificate before" |
| 5402 " releasing your website to the public.")); | 5402 " releasing your website to the public.")); |
| 5403 } | 5403 } |
| 5404 | 5404 |
| 5405 } // namespace content | 5405 } // namespace content |
| OLD | NEW |