Chromium Code Reviews| 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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 void WebContentsImpl::DidChangeVisibleSecurityState() { | 1462 void WebContentsImpl::DidChangeVisibleSecurityState() { |
| 1463 if (delegate_) { | 1463 if (delegate_) { |
| 1464 delegate_->VisibleSecurityStateChanged(this); | 1464 delegate_->VisibleSecurityStateChanged(this); |
| 1465 for (auto& observer : observers_) | 1465 for (auto& observer : observers_) |
| 1466 observer.DidChangeVisibleSecurityState(); | 1466 observer.DidChangeVisibleSecurityState(); |
| 1467 } | 1467 } |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 bool WebContentsImpl::NotifyCertificateError( | |
| 1471 base::Callback<void(content::CertificateRequestResultType)> callback) { | |
| 1472 bool handled = false; | |
| 1473 for (auto& observer : observers_) | |
|
Sami
2017/02/08 14:58:43
nit: I'd add braces around the multi-line for loop
irisu
2017/02/14 05:46:14
Done.
| |
| 1474 if (observer.NotifyCertificateError(callback)) { | |
| 1475 handled = true; | |
| 1476 break; | |
| 1477 } | |
| 1478 return handled; | |
| 1479 } | |
| 1480 | |
| 1470 void WebContentsImpl::Stop() { | 1481 void WebContentsImpl::Stop() { |
| 1471 for (FrameTreeNode* node : frame_tree_.Nodes()) | 1482 for (FrameTreeNode* node : frame_tree_.Nodes()) |
| 1472 node->StopLoading(); | 1483 node->StopLoading(); |
| 1473 for (auto& observer : observers_) | 1484 for (auto& observer : observers_) |
| 1474 observer.NavigationStopped(); | 1485 observer.NavigationStopped(); |
| 1475 } | 1486 } |
| 1476 | 1487 |
| 1477 WebContents* WebContentsImpl::Clone() { | 1488 WebContents* WebContentsImpl::Clone() { |
| 1478 // We use our current SiteInstance since the cloned entry will use it anyway. | 1489 // We use our current SiteInstance since the cloned entry will use it anyway. |
| 1479 // We pass our own opener so that the cloned page can access it if it was set | 1490 // We pass our own opener so that the cloned page can access it if it was set |
| (...skipping 3927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5407 GetMainFrame()->AddMessageToConsole( | 5418 GetMainFrame()->AddMessageToConsole( |
| 5408 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5419 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5409 base::StringPrintf("This site does not have a valid SSL " | 5420 base::StringPrintf("This site does not have a valid SSL " |
| 5410 "certificate! Without SSL, your site's and " | 5421 "certificate! Without SSL, your site's and " |
| 5411 "visitors' data is vulnerable to theft and " | 5422 "visitors' data is vulnerable to theft and " |
| 5412 "tampering. Get a valid SSL certificate before" | 5423 "tampering. Get a valid SSL certificate before" |
| 5413 " releasing your website to the public.")); | 5424 " releasing your website to the public.")); |
| 5414 } | 5425 } |
| 5415 | 5426 |
| 5416 } // namespace content | 5427 } // namespace content |
| OLD | NEW |