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 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 void WebContentsImpl::DidChangeVisibleSecurityState() { | 1460 void WebContentsImpl::DidChangeVisibleSecurityState() { |
| 1461 if (delegate_) { | 1461 if (delegate_) { |
| 1462 delegate_->VisibleSecurityStateChanged(this); | 1462 delegate_->VisibleSecurityStateChanged(this); |
| 1463 for (auto& observer : observers_) | 1463 for (auto& observer : observers_) |
| 1464 observer.DidChangeVisibleSecurityState(); | 1464 observer.DidChangeVisibleSecurityState(); |
| 1465 } | 1465 } |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 bool WebContentsImpl::NotifyCertificateError( | |
| 1469 base::Callback<void(content::CertificateRequestResultType)> callback) { | |
| 1470 bool handled = false; | |
| 1471 for (auto& observer : observers_) | |
| 1472 if (observer.NotifyCertificateError(callback)) | |
| 1473 handled = true; | |
|
Eric Seckler
2017/01/19 11:42:28
I think we have to break the loop in this case - o
irisu
2017/02/07 23:30:19
Done.
| |
| 1474 return handled; | |
| 1475 } | |
| 1476 | |
| 1468 void WebContentsImpl::Stop() { | 1477 void WebContentsImpl::Stop() { |
| 1469 for (FrameTreeNode* node : frame_tree_.Nodes()) | 1478 for (FrameTreeNode* node : frame_tree_.Nodes()) |
| 1470 node->StopLoading(); | 1479 node->StopLoading(); |
| 1471 for (auto& observer : observers_) | 1480 for (auto& observer : observers_) |
| 1472 observer.NavigationStopped(); | 1481 observer.NavigationStopped(); |
| 1473 } | 1482 } |
| 1474 | 1483 |
| 1475 WebContents* WebContentsImpl::Clone() { | 1484 WebContents* WebContentsImpl::Clone() { |
| 1476 // We use our current SiteInstance since the cloned entry will use it anyway. | 1485 // We use our current SiteInstance since the cloned entry will use it anyway. |
| 1477 // We pass our own opener so that the cloned page can access it if it was set | 1486 // We pass our own opener so that the cloned page can access it if it was set |
| (...skipping 3941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5419 GetMainFrame()->AddMessageToConsole( | 5428 GetMainFrame()->AddMessageToConsole( |
| 5420 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5429 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5421 base::StringPrintf("This site does not have a valid SSL " | 5430 base::StringPrintf("This site does not have a valid SSL " |
| 5422 "certificate! Without SSL, your site's and " | 5431 "certificate! Without SSL, your site's and " |
| 5423 "visitors' data is vulnerable to theft and " | 5432 "visitors' data is vulnerable to theft and " |
| 5424 "tampering. Get a valid SSL certificate before" | 5433 "tampering. Get a valid SSL certificate before" |
| 5425 " releasing your website to the public.")); | 5434 " releasing your website to the public.")); |
| 5426 } | 5435 } |
| 5427 | 5436 |
| 5428 } // namespace content | 5437 } // namespace content |
| OLD | NEW |