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

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

Issue 2456383003: Reland of Trigger Dangerous indicator for unsafe subresources (Closed)
Patch Set: initialize is_subframe 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 // At this point, we should destroy the TextInputManager which will notify all 1450 // At this point, we should destroy the TextInputManager which will notify all
1451 // the RWHV in this WebContents. The RWHV in this WebContents should use the 1451 // the RWHV in this WebContents. The RWHV in this WebContents should use the
1452 // TextInputManager owned by the outer WebContents. 1452 // TextInputManager owned by the outer WebContents.
1453 // TODO(ekaramad): Is it possible to have TextInputState before attaching to 1453 // TODO(ekaramad): Is it possible to have TextInputState before attaching to
1454 // outer WebContents? In such a case, is this still the right way to hand off 1454 // outer WebContents? In such a case, is this still the right way to hand off
1455 // state tracking from inner WebContents's TextInputManager to that of the 1455 // state tracking from inner WebContents's TextInputManager to that of the
1456 // outer WebContent (crbug.com/609846)? 1456 // outer WebContent (crbug.com/609846)?
1457 text_input_manager_.reset(nullptr); 1457 text_input_manager_.reset(nullptr);
1458 } 1458 }
1459 1459
1460 void WebContentsImpl::DidChangeVisibleSecurityState() {
1461 if (delegate_) {
1462 delegate_->VisibleSecurityStateChanged(this);
1463
1464 SecurityStyleExplanations security_style_explanations;
1465 blink::WebSecurityStyle security_style =
1466 delegate_->GetSecurityStyle(this, &security_style_explanations);
1467 for (auto& observer : observers_) {
1468 observer.SecurityStyleChanged(security_style,
1469 security_style_explanations);
1470 }
1471 }
1472 }
1473
1460 void WebContentsImpl::Stop() { 1474 void WebContentsImpl::Stop() {
1461 for (FrameTreeNode* node : frame_tree_.Nodes()) 1475 for (FrameTreeNode* node : frame_tree_.Nodes())
1462 node->StopLoading(); 1476 node->StopLoading();
1463 for (auto& observer : observers_) 1477 for (auto& observer : observers_)
1464 observer.NavigationStopped(); 1478 observer.NavigationStopped();
1465 } 1479 }
1466 1480
1467 WebContents* WebContentsImpl::Clone() { 1481 WebContents* WebContentsImpl::Clone() {
1468 // We use our current SiteInstance since the cloned entry will use it anyway. 1482 // We use our current SiteInstance since the cloned entry will use it anyway.
1469 // We pass our own opener so that the cloned page can access it if it was set 1483 // 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
3835 did_first_visually_non_empty_paint_ = true; 3849 did_first_visually_non_empty_paint_ = true;
3836 3850
3837 if (theme_color_ != last_sent_theme_color_) { 3851 if (theme_color_ != last_sent_theme_color_) {
3838 // Theme color should have updated by now if there was one. 3852 // Theme color should have updated by now if there was one.
3839 for (auto& observer : observers_) 3853 for (auto& observer : observers_)
3840 observer.DidChangeThemeColor(theme_color_); 3854 observer.DidChangeThemeColor(theme_color_);
3841 last_sent_theme_color_ = theme_color_; 3855 last_sent_theme_color_ = theme_color_;
3842 } 3856 }
3843 } 3857 }
3844 3858
3845 void WebContentsImpl::DidChangeVisibleSSLState() {
3846 if (delegate_) {
3847 delegate_->VisibleSSLStateChanged(this);
3848
3849 SecurityStyleExplanations security_style_explanations;
3850 blink::WebSecurityStyle security_style =
3851 delegate_->GetSecurityStyle(this, &security_style_explanations);
3852 for (auto& observer : observers_) {
3853 observer.SecurityStyleChanged(security_style,
3854 security_style_explanations);
3855 }
3856 }
3857 }
3858
3859 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { 3859 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() {
3860 for (auto& observer : observers_) 3860 for (auto& observer : observers_)
3861 observer.BeforeFormRepostWarningShow(); 3861 observer.BeforeFormRepostWarningShow();
3862 } 3862 }
3863 3863
3864 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() { 3864 void WebContentsImpl::ActivateAndShowRepostFormWarningDialog() {
3865 Activate(); 3865 Activate();
3866 if (delegate_) 3866 if (delegate_)
3867 delegate_->ShowRepostFormWarningDialog(this); 3867 delegate_->ShowRepostFormWarningDialog(this);
3868 } 3868 }
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
5208 dialog_manager_ = dialog_manager; 5208 dialog_manager_ = dialog_manager;
5209 } 5209 }
5210 5210
5211 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5211 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5212 auto it = binding_sets_.find(interface_name); 5212 auto it = binding_sets_.find(interface_name);
5213 if (it != binding_sets_.end()) 5213 if (it != binding_sets_.end())
5214 binding_sets_.erase(it); 5214 binding_sets_.erase(it);
5215 } 5215 }
5216 5216
5217 } // namespace content 5217 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698