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 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 // At this point, we should destroy the TextInputManager which will notify all | 1448 // At this point, we should destroy the TextInputManager which will notify all |
1449 // the RWHV in this WebContents. The RWHV in this WebContents should use the | 1449 // the RWHV in this WebContents. The RWHV in this WebContents should use the |
1450 // TextInputManager owned by the outer WebContents. | 1450 // TextInputManager owned by the outer WebContents. |
1451 // TODO(ekaramad): Is it possible to have TextInputState before attaching to | 1451 // TODO(ekaramad): Is it possible to have TextInputState before attaching to |
1452 // outer WebContents? In such a case, is this still the right way to hand off | 1452 // outer WebContents? In such a case, is this still the right way to hand off |
1453 // state tracking from inner WebContents's TextInputManager to that of the | 1453 // state tracking from inner WebContents's TextInputManager to that of the |
1454 // outer WebContent (crbug.com/609846)? | 1454 // outer WebContent (crbug.com/609846)? |
1455 text_input_manager_.reset(nullptr); | 1455 text_input_manager_.reset(nullptr); |
1456 } | 1456 } |
1457 | 1457 |
1458 void WebContentsImpl::DidChangeVisibleSecurityState() { | |
1459 if (delegate_) { | |
1460 delegate_->VisibleSecurityStateChanged(this); | |
1461 | |
1462 SecurityStyleExplanations security_style_explanations; | |
1463 blink::WebSecurityStyle security_style = | |
1464 delegate_->GetSecurityStyle(this, &security_style_explanations); | |
1465 for (auto& observer : observers_) { | |
1466 observer.SecurityStyleChanged(security_style, | |
1467 security_style_explanations); | |
1468 } | |
1469 } | |
1470 } | |
1471 | |
1472 void WebContentsImpl::Stop() { | 1458 void WebContentsImpl::Stop() { |
1473 for (FrameTreeNode* node : frame_tree_.Nodes()) | 1459 for (FrameTreeNode* node : frame_tree_.Nodes()) |
1474 node->StopLoading(); | 1460 node->StopLoading(); |
1475 for (auto& observer : observers_) | 1461 for (auto& observer : observers_) |
1476 observer.NavigationStopped(); | 1462 observer.NavigationStopped(); |
1477 } | 1463 } |
1478 | 1464 |
1479 WebContents* WebContentsImpl::Clone() { | 1465 WebContents* WebContentsImpl::Clone() { |
1480 // We use our current SiteInstance since the cloned entry will use it anyway. | 1466 // We use our current SiteInstance since the cloned entry will use it anyway. |
1481 // We pass our own opener so that the cloned page can access it if it was set | 1467 // We pass our own opener so that the cloned page can access it if it was set |
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 did_first_visually_non_empty_paint_ = true; | 3833 did_first_visually_non_empty_paint_ = true; |
3848 | 3834 |
3849 if (theme_color_ != last_sent_theme_color_) { | 3835 if (theme_color_ != last_sent_theme_color_) { |
3850 // Theme color should have updated by now if there was one. | 3836 // Theme color should have updated by now if there was one. |
3851 for (auto& observer : observers_) | 3837 for (auto& observer : observers_) |
3852 observer.DidChangeThemeColor(theme_color_); | 3838 observer.DidChangeThemeColor(theme_color_); |
3853 last_sent_theme_color_ = theme_color_; | 3839 last_sent_theme_color_ = theme_color_; |
3854 } | 3840 } |
3855 } | 3841 } |
3856 | 3842 |
| 3843 void WebContentsImpl::DidChangeVisibleSSLState() { |
| 3844 if (delegate_) { |
| 3845 delegate_->VisibleSSLStateChanged(this); |
| 3846 |
| 3847 SecurityStyleExplanations security_style_explanations; |
| 3848 blink::WebSecurityStyle security_style = |
| 3849 delegate_->GetSecurityStyle(this, &security_style_explanations); |
| 3850 for (auto& observer : observers_) { |
| 3851 observer.SecurityStyleChanged(security_style, |
| 3852 security_style_explanations); |
| 3853 } |
| 3854 } |
| 3855 } |
| 3856 |
3857 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { | 3857 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { |
3858 for (auto& observer : observers_) | 3858 for (auto& observer : observers_) |
3859 observer.BeforeFormRepostWarningShow(); | 3859 observer.BeforeFormRepostWarningShow(); |
3860 } | 3860 } |
3861 | 3861 |
3862 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { | 3862 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { |
3863 Activate(); | 3863 Activate(); |
3864 if (delegate_) | 3864 if (delegate_) |
3865 delegate_->ShowRepostFormWarningDialog(this); | 3865 delegate_->ShowRepostFormWarningDialog(this); |
3866 } | 3866 } |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5206 dialog_manager_ = dialog_manager; | 5206 dialog_manager_ = dialog_manager; |
5207 } | 5207 } |
5208 | 5208 |
5209 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5209 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
5210 auto it = binding_sets_.find(interface_name); | 5210 auto it = binding_sets_.find(interface_name); |
5211 if (it != binding_sets_.end()) | 5211 if (it != binding_sets_.end()) |
5212 binding_sets_.erase(it); | 5212 binding_sets_.erase(it); |
5213 } | 5213 } |
5214 | 5214 |
5215 } // namespace content | 5215 } // namespace content |
OLD | NEW |