Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2444383007: Trigger Dangerous indicator for unsafe subresources (Closed)
Patch Set: protip: #include the .h, not the .cc Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
1458 void WebContentsImpl::Stop() { 1472 void WebContentsImpl::Stop() {
1459 for (FrameTreeNode* node : frame_tree_.Nodes()) 1473 for (FrameTreeNode* node : frame_tree_.Nodes())
1460 node->StopLoading(); 1474 node->StopLoading();
1461 for (auto& observer : observers_) 1475 for (auto& observer : observers_)
1462 observer.NavigationStopped(); 1476 observer.NavigationStopped();
1463 } 1477 }
1464 1478
1465 WebContents* WebContentsImpl::Clone() { 1479 WebContents* WebContentsImpl::Clone() {
1466 // We use our current SiteInstance since the cloned entry will use it anyway. 1480 // We use our current SiteInstance since the cloned entry will use it anyway.
1467 // We pass our own opener so that the cloned page can access it if it was set 1481 // 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
3833 did_first_visually_non_empty_paint_ = true; 3847 did_first_visually_non_empty_paint_ = true;
3834 3848
3835 if (theme_color_ != last_sent_theme_color_) { 3849 if (theme_color_ != last_sent_theme_color_) {
3836 // Theme color should have updated by now if there was one. 3850 // Theme color should have updated by now if there was one.
3837 for (auto& observer : observers_) 3851 for (auto& observer : observers_)
3838 observer.DidChangeThemeColor(theme_color_); 3852 observer.DidChangeThemeColor(theme_color_);
3839 last_sent_theme_color_ = theme_color_; 3853 last_sent_theme_color_ = theme_color_;
3840 } 3854 }
3841 } 3855 }
3842 3856
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698