| 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/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
| 20 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
| 21 #include "base/metrics/histogram_macros.h" | 22 #include "base/metrics/histogram_macros.h" |
| 22 #include "base/process/process.h" | 23 #include "base/process/process.h" |
| 23 #include "base/profiler/scoped_tracker.h" | 24 #include "base/profiler/scoped_tracker.h" |
| 24 #include "base/single_thread_task_runner.h" | 25 #include "base/single_thread_task_runner.h" |
| (...skipping 5097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5122 // Don't leak the sync IPC reply if the RFH or process is gone. | 5123 // Don't leak the sync IPC reply if the RFH or process is gone. |
| 5123 delete reply_msg; | 5124 delete reply_msg; |
| 5124 } | 5125 } |
| 5125 } | 5126 } |
| 5126 | 5127 |
| 5127 void WebContentsImpl::SetEncoding(const std::string& encoding) { | 5128 void WebContentsImpl::SetEncoding(const std::string& encoding) { |
| 5128 if (encoding == last_reported_encoding_) | 5129 if (encoding == last_reported_encoding_) |
| 5129 return; | 5130 return; |
| 5130 last_reported_encoding_ = encoding; | 5131 last_reported_encoding_ = encoding; |
| 5131 | 5132 |
| 5132 canonical_encoding_ = GetContentClient()->browser()-> | 5133 canonical_encoding_ = base::GetCanonicalEncodingNameByAliasName(encoding); |
| 5133 GetCanonicalEncodingNameByAliasName(encoding); | |
| 5134 } | 5134 } |
| 5135 | 5135 |
| 5136 bool WebContentsImpl::IsHidden() { | 5136 bool WebContentsImpl::IsHidden() { |
| 5137 return capturer_count_ == 0 && !should_normally_be_visible_; | 5137 return capturer_count_ == 0 && !should_normally_be_visible_; |
| 5138 } | 5138 } |
| 5139 | 5139 |
| 5140 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { | 5140 int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() { |
| 5141 if (node_ && node_->outer_web_contents()) | 5141 if (node_ && node_->outer_web_contents()) |
| 5142 return node_->outer_contents_frame_tree_node_id(); | 5142 return node_->outer_contents_frame_tree_node_id(); |
| 5143 | 5143 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 GetMainFrame()->AddMessageToConsole( | 5391 GetMainFrame()->AddMessageToConsole( |
| 5392 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5392 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5393 base::StringPrintf("This site does not have a valid SSL " | 5393 base::StringPrintf("This site does not have a valid SSL " |
| 5394 "certificate! Without SSL, your site's and " | 5394 "certificate! Without SSL, your site's and " |
| 5395 "visitors' data is vulnerable to theft and " | 5395 "visitors' data is vulnerable to theft and " |
| 5396 "tampering. Get a valid SSL certificate before" | 5396 "tampering. Get a valid SSL certificate before" |
| 5397 " releasing your website to the public.")); | 5397 " releasing your website to the public.")); |
| 5398 } | 5398 } |
| 5399 | 5399 |
| 5400 } // namespace content | 5400 } // namespace content |
| OLD | NEW |