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

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

Issue 2562503002: Generalize WebContentsObserver::SecurityStyleChanged (Closed)
Patch Set: Fix nit. Created 4 years 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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 // TODO(ekaramad): Is it possible to have TextInputState before attaching to 1464 // TODO(ekaramad): Is it possible to have TextInputState before attaching to
1465 // outer WebContents? In such a case, is this still the right way to hand off 1465 // outer WebContents? In such a case, is this still the right way to hand off
1466 // state tracking from inner WebContents's TextInputManager to that of the 1466 // state tracking from inner WebContents's TextInputManager to that of the
1467 // outer WebContent (crbug.com/609846)? 1467 // outer WebContent (crbug.com/609846)?
1468 text_input_manager_.reset(nullptr); 1468 text_input_manager_.reset(nullptr);
1469 } 1469 }
1470 1470
1471 void WebContentsImpl::DidChangeVisibleSecurityState() { 1471 void WebContentsImpl::DidChangeVisibleSecurityState() {
1472 if (delegate_) { 1472 if (delegate_) {
1473 delegate_->VisibleSecurityStateChanged(this); 1473 delegate_->VisibleSecurityStateChanged(this);
1474 1474 for (auto& observer : observers_)
1475 SecurityStyleExplanations security_style_explanations; 1475 observer.DidChangeVisibleSecurityState();
1476 blink::WebSecurityStyle security_style =
1477 delegate_->GetSecurityStyle(this, &security_style_explanations);
1478 for (auto& observer : observers_) {
1479 observer.SecurityStyleChanged(security_style,
1480 security_style_explanations);
1481 }
1482 } 1476 }
1483 } 1477 }
1484 1478
1485 void WebContentsImpl::Stop() { 1479 void WebContentsImpl::Stop() {
1486 for (FrameTreeNode* node : frame_tree_.Nodes()) 1480 for (FrameTreeNode* node : frame_tree_.Nodes())
1487 node->StopLoading(); 1481 node->StopLoading();
1488 for (auto& observer : observers_) 1482 for (auto& observer : observers_)
1489 observer.NavigationStopped(); 1483 observer.NavigationStopped();
1490 } 1484 }
1491 1485
(...skipping 3835 matching lines...) Expand 10 before | Expand all | Expand 10 after
5327 GetMainFrame()->AddMessageToConsole( 5321 GetMainFrame()->AddMessageToConsole(
5328 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5322 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5329 base::StringPrintf("This site does not have a valid SSL " 5323 base::StringPrintf("This site does not have a valid SSL "
5330 "certificate! Without SSL, your site's and " 5324 "certificate! Without SSL, your site's and "
5331 "visitors' data is vulnerable to theft and " 5325 "visitors' data is vulnerable to theft and "
5332 "tampering. Get a valid SSL certificate before" 5326 "tampering. Get a valid SSL certificate before"
5333 " releasing your website to the public.")); 5327 " releasing your website to the public."));
5334 } 5328 }
5335 5329
5336 } // namespace content 5330 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/security_handler.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698