OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 NavigationController* tab = tab_tracker_->GetResource(tab_handle); | 1473 NavigationController* tab = tab_tracker_->GetResource(tab_handle); |
1474 restore_tracker_.reset( | 1474 restore_tracker_.reset( |
1475 new NavigationControllerRestoredObserver(this, tab, reply_message)); | 1475 new NavigationControllerRestoredObserver(this, tab, reply_message)); |
1476 } else { | 1476 } else { |
1477 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams( | 1477 AutomationMsg_WaitForTabToBeRestored::WriteReplyParams( |
1478 reply_message, false); | 1478 reply_message, false); |
1479 Send(reply_message); | 1479 Send(reply_message); |
1480 } | 1480 } |
1481 } | 1481 } |
1482 | 1482 |
1483 void TestingAutomationProvider::GetSecurityState( | 1483 void TestingAutomationProvider::GetSecurityState(int handle, |
1484 int handle, | 1484 bool* success, |
1485 bool* success, | 1485 SecurityStyle* security_style, |
1486 SecurityStyle* security_style, | 1486 int* ssl_cert_status, |
1487 net::CertStatus* ssl_cert_status, | 1487 int* insecure_content_status) { |
1488 int* insecure_content_status) { | |
1489 if (tab_tracker_->ContainsHandle(handle)) { | 1488 if (tab_tracker_->ContainsHandle(handle)) { |
1490 NavigationController* tab = tab_tracker_->GetResource(handle); | 1489 NavigationController* tab = tab_tracker_->GetResource(handle); |
1491 NavigationEntry* entry = tab->GetActiveEntry(); | 1490 NavigationEntry* entry = tab->GetActiveEntry(); |
1492 *success = true; | 1491 *success = true; |
1493 *security_style = entry->ssl().security_style(); | 1492 *security_style = entry->ssl().security_style(); |
1494 *ssl_cert_status = entry->ssl().cert_status(); | 1493 *ssl_cert_status = entry->ssl().cert_status(); |
1495 *insecure_content_status = entry->ssl().content_status(); | 1494 *insecure_content_status = entry->ssl().content_status(); |
1496 } else { | 1495 } else { |
1497 *success = false; | 1496 *success = false; |
1498 *security_style = SECURITY_STYLE_UNKNOWN; | 1497 *security_style = SECURITY_STYLE_UNKNOWN; |
(...skipping 4849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6348 | 6347 |
6349 Send(reply_message_); | 6348 Send(reply_message_); |
6350 redirect_query_ = 0; | 6349 redirect_query_ = 0; |
6351 reply_message_ = NULL; | 6350 reply_message_ = NULL; |
6352 } | 6351 } |
6353 | 6352 |
6354 void TestingAutomationProvider::OnRemoveProvider() { | 6353 void TestingAutomationProvider::OnRemoveProvider() { |
6355 if (g_browser_process) | 6354 if (g_browser_process) |
6356 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6355 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
6357 } | 6356 } |
OLD | NEW |