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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 4200007: Refactor automation messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome_frame no longer depends on tab_contents.h Created 10 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 8f648d0828a5fe9e8846998b15b91738f9f5825d..d7c6906e71eae359abff217bbc57f65416dcb7ee 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -65,7 +65,7 @@
#include "chrome/browser/notifications/balloon_collection.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
-#include "chrome/test/automation/automation_messages.h"
+#include "chrome/common/automation_messages.h"
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "views/event.h"
@@ -1352,7 +1352,7 @@ void TestingAutomationProvider::GetSecurityState(int handle,
void TestingAutomationProvider::GetPageType(
int handle,
bool* success,
- NavigationEntry::PageType* page_type) {
+ PageType* page_type) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
NavigationEntry* entry = tab->GetActiveEntry();
@@ -1360,12 +1360,12 @@ void TestingAutomationProvider::GetPageType(
*success = true;
// In order to return the proper result when an interstitial is shown and
// no navigation entry were created for it we need to ask the TabContents.
- if (*page_type == NavigationEntry::NORMAL_PAGE &&
+ if (*page_type == NORMAL_PAGE &&
tab->tab_contents()->showing_interstitial_page())
- *page_type = NavigationEntry::INTERSTITIAL_PAGE;
+ *page_type = INTERSTITIAL_PAGE;
} else {
*success = false;
- *page_type = NavigationEntry::NORMAL_PAGE;
+ *page_type = NORMAL_PAGE;
}
}
@@ -1383,7 +1383,7 @@ void TestingAutomationProvider::ActionOnSSLBlockingPage(
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
NavigationEntry* entry = tab->GetActiveEntry();
- if (entry->page_type() == NavigationEntry::INTERSTITIAL_PAGE) {
+ if (entry->page_type() == INTERSTITIAL_PAGE) {
TabContents* tab_contents = tab->tab_contents();
InterstitialPage* ssl_blocking_page =
InterstitialPage::GetInterstitialPage(tab_contents);
@@ -2458,10 +2458,10 @@ void TestingAutomationProvider::GetNavigationInfo(
return_value->Set("ssl", ssl);
// Page type.
- std::map<NavigationEntry::PageType, std::string> pagetype_to_string;
- pagetype_to_string[NavigationEntry::NORMAL_PAGE] = "NORMAL_PAGE";
- pagetype_to_string[NavigationEntry::ERROR_PAGE] = "ERROR_PAGE";
- pagetype_to_string[NavigationEntry::INTERSTITIAL_PAGE] = "INTERSTITIAL_PAGE";
+ std::map<PageType, std::string> pagetype_to_string;
+ pagetype_to_string[NORMAL_PAGE] = "NORMAL_PAGE";
+ pagetype_to_string[ERROR_PAGE] = "ERROR_PAGE";
+ pagetype_to_string[INTERSTITIAL_PAGE] = "INTERSTITIAL_PAGE";
return_value->SetString("page_type",
pagetype_to_string[nav_entry->page_type()]);

Powered by Google App Engine
This is Rietveld 408576698