| 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> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/debug/dump_without_crashing.h" | 13 #include "base/debug/dump_without_crashing.h" |
| 14 #include "base/feature_list.h" | 14 #include "base/feature_list.h" |
| 15 #include "base/i18n/character_encoding.h" |
| 15 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
| 16 #include "base/location.h" | 17 #include "base/location.h" |
| 17 #include "base/logging.h" | 18 #include "base/logging.h" |
| 18 #include "base/macros.h" | 19 #include "base/macros.h" |
| 19 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 20 #include "base/metrics/histogram_macros.h" | 21 #include "base/metrics/histogram_macros.h" |
| 21 #include "base/process/process.h" | 22 #include "base/process/process.h" |
| 22 #include "base/profiler/scoped_tracker.h" | 23 #include "base/profiler/scoped_tracker.h" |
| 23 #include "base/single_thread_task_runner.h" | 24 #include "base/single_thread_task_runner.h" |
| 24 #include "base/strings/string16.h" | 25 #include "base/strings/string16.h" |
| (...skipping 5040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5065 // Don't leak the sync IPC reply if the RFH or process is gone. | 5066 // Don't leak the sync IPC reply if the RFH or process is gone. |
| 5066 delete reply_msg; | 5067 delete reply_msg; |
| 5067 } | 5068 } |
| 5068 } | 5069 } |
| 5069 | 5070 |
| 5070 void WebContentsImpl::SetEncoding(const std::string& encoding) { | 5071 void WebContentsImpl::SetEncoding(const std::string& encoding) { |
| 5071 if (encoding == last_reported_encoding_) | 5072 if (encoding == last_reported_encoding_) |
| 5072 return; | 5073 return; |
| 5073 last_reported_encoding_ = encoding; | 5074 last_reported_encoding_ = encoding; |
| 5074 | 5075 |
| 5075 canonical_encoding_ = GetContentClient()->browser()-> | 5076 canonical_encoding_ = base::GetCanonicalEncodingNameByAliasName(encoding); |
| 5076 GetCanonicalEncodingNameByAliasName(encoding); | |
| 5077 } | 5077 } |
| 5078 | 5078 |
| 5079 bool WebContentsImpl::IsHidden() { | 5079 bool WebContentsImpl::IsHidden() { |
| 5080 return capturer_count_ == 0 && !should_normally_be_visible_; | 5080 return capturer_count_ == 0 && !should_normally_be_visible_; |
| 5081 } | 5081 } |
| 5082 | 5082 |
| 5083 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { | 5083 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { |
| 5084 if (node_ && node_->outer_web_contents()) | 5084 if (node_ && node_->outer_web_contents()) |
| 5085 return node_->outer_contents_frame_tree_node_id(); | 5085 return node_->outer_contents_frame_tree_node_id(); |
| 5086 | 5086 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5319 GetMainFrame()->AddMessageToConsole( | 5319 GetMainFrame()->AddMessageToConsole( |
| 5320 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5320 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5321 base::StringPrintf("This site does not have a valid SSL " | 5321 base::StringPrintf("This site does not have a valid SSL " |
| 5322 "certificate! Without SSL, your site's and " | 5322 "certificate! Without SSL, your site's and " |
| 5323 "visitors' data is vulnerable to theft and " | 5323 "visitors' data is vulnerable to theft and " |
| 5324 "tampering. Get a valid SSL certificate before" | 5324 "tampering. Get a valid SSL certificate before" |
| 5325 " releasing your website to the public.")); | 5325 " releasing your website to the public.")); |
| 5326 } | 5326 } |
| 5327 | 5327 |
| 5328 } // namespace content | 5328 } // namespace content |
| OLD | NEW |