| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #include "content/public/browser/screen_orientation_dispatcher_host.h" | 82 #include "content/public/browser/screen_orientation_dispatcher_host.h" |
| 83 #include "content/public/browser/storage_partition.h" | 83 #include "content/public/browser/storage_partition.h" |
| 84 #include "content/public/browser/user_metrics.h" | 84 #include "content/public/browser/user_metrics.h" |
| 85 #include "content/public/browser/web_contents_delegate.h" | 85 #include "content/public/browser/web_contents_delegate.h" |
| 86 #include "content/public/browser/web_contents_observer.h" | 86 #include "content/public/browser/web_contents_observer.h" |
| 87 #include "content/public/common/bindings_policy.h" | 87 #include "content/public/common/bindings_policy.h" |
| 88 #include "content/public/common/content_constants.h" | 88 #include "content/public/common/content_constants.h" |
| 89 #include "content/public/common/content_switches.h" | 89 #include "content/public/common/content_switches.h" |
| 90 #include "content/public/common/page_zoom.h" | 90 #include "content/public/common/page_zoom.h" |
| 91 #include "content/public/common/result_codes.h" | 91 #include "content/public/common/result_codes.h" |
| 92 #include "content/public/common/security_style.h" |
| 92 #include "content/public/common/url_constants.h" | 93 #include "content/public/common/url_constants.h" |
| 93 #include "content/public/common/url_utils.h" | 94 #include "content/public/common/url_utils.h" |
| 94 #include "content/public/common/web_preferences.h" | 95 #include "content/public/common/web_preferences.h" |
| 95 #include "net/base/net_util.h" | 96 #include "net/base/net_util.h" |
| 96 #include "net/http/http_cache.h" | 97 #include "net/http/http_cache.h" |
| 97 #include "net/http/http_transaction_factory.h" | 98 #include "net/http/http_transaction_factory.h" |
| 98 #include "net/url_request/url_request_context.h" | 99 #include "net/url_request/url_request_context.h" |
| 99 #include "net/url_request/url_request_context_getter.h" | 100 #include "net/url_request/url_request_context_getter.h" |
| 100 #include "ui/base/layout.h" | 101 #include "ui/base/layout.h" |
| 101 #include "ui/gfx/display.h" | 102 #include "ui/gfx/display.h" |
| (...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3204 | 3205 |
| 3205 if (theme_color_ != last_sent_theme_color_) { | 3206 if (theme_color_ != last_sent_theme_color_) { |
| 3206 // Theme color should have updated by now if there was one. | 3207 // Theme color should have updated by now if there was one. |
| 3207 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3208 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3208 DidChangeThemeColor(theme_color_)); | 3209 DidChangeThemeColor(theme_color_)); |
| 3209 last_sent_theme_color_ = theme_color_; | 3210 last_sent_theme_color_ = theme_color_; |
| 3210 } | 3211 } |
| 3211 } | 3212 } |
| 3212 | 3213 |
| 3213 void WebContentsImpl::DidChangeVisibleSSLState() { | 3214 void WebContentsImpl::DidChangeVisibleSSLState() { |
| 3214 if (delegate_) | 3215 if (delegate_) { |
| 3215 delegate_->VisibleSSLStateChanged(this); | 3216 delegate_->VisibleSSLStateChanged(this); |
| 3217 |
| 3218 content::SecurityStyle security_style = delegate_->GetSecurityStyle(this); |
| 3219 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3220 SecurityStyleChanged(security_style)); |
| 3221 } |
| 3216 } | 3222 } |
| 3217 | 3223 |
| 3218 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { | 3224 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { |
| 3219 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3225 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3220 BeforeFormRepostWarningShow()); | 3226 BeforeFormRepostWarningShow()); |
| 3221 } | 3227 } |
| 3222 | 3228 |
| 3223 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { | 3229 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { |
| 3224 Activate(); | 3230 Activate(); |
| 3225 if (delegate_) | 3231 if (delegate_) |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4435 player_map->erase(it); | 4441 player_map->erase(it); |
| 4436 } | 4442 } |
| 4437 | 4443 |
| 4438 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4444 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4439 force_disable_overscroll_content_ = force_disable; | 4445 force_disable_overscroll_content_ = force_disable; |
| 4440 if (view_) | 4446 if (view_) |
| 4441 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4447 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4442 } | 4448 } |
| 4443 | 4449 |
| 4444 } // namespace content | 4450 } // namespace content |
| OLD | NEW |