summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/testing_automation_provider.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-18 17:08:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-18 17:08:53 +0000
commit66fdbd5b47697242f38b6ea82e5e6df86786e489 (patch)
tree4fe44b90d97a29afbf969579c0cb10c152eb51e0 /chrome/browser/automation/testing_automation_provider.cc
parent07c4ce78c859c6913f6e1f5fe0d6a38e94cd2434 (diff)
downloadchromium_src-66fdbd5b47697242f38b6ea82e5e6df86786e489.zip
chromium_src-66fdbd5b47697242f38b6ea82e5e6df86786e489.tar.gz
chromium_src-66fdbd5b47697242f38b6ea82e5e6df86786e489.tar.bz2
Move the PageType enum to content/public/common, put it into the content namespace, and also make it conform to the Content API enum naming convention.
BUG=98716 TBR=ananta Review URL: http://codereview.chromium.org/8336013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider.cc')
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 58a0474..61d05c4 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -1560,7 +1560,7 @@ void TestingAutomationProvider::GetSecurityState(
void TestingAutomationProvider::GetPageType(
int handle,
bool* success,
- PageType* page_type) {
+ content::PageType* page_type) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
NavigationEntry* entry = tab->GetActiveEntry();
@@ -1568,12 +1568,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 == NORMAL_PAGE &&
+ if (*page_type == content::PAGE_TYPE_NORMAL &&
tab->tab_contents()->showing_interstitial_page())
- *page_type = INTERSTITIAL_PAGE;
+ *page_type = content::PAGE_TYPE_INTERSTITIAL;
} else {
*success = false;
- *page_type = NORMAL_PAGE;
+ *page_type = content::PAGE_TYPE_NORMAL;
}
}
@@ -1591,7 +1591,7 @@ void TestingAutomationProvider::ActionOnSSLBlockingPage(
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
NavigationEntry* entry = tab->GetActiveEntry();
- if (entry->page_type() == INTERSTITIAL_PAGE) {
+ if (entry->page_type() == content::PAGE_TYPE_INTERSTITIAL) {
TabContents* tab_contents = tab->tab_contents();
InterstitialPage* ssl_blocking_page =
InterstitialPage::GetInterstitialPage(tab_contents);
@@ -2998,10 +2998,11 @@ void TestingAutomationProvider::GetNavigationInfo(
return_value->Set("ssl", ssl);
// Page type.
- 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";
+ std::map<content::PageType, std::string> pagetype_to_string;
+ pagetype_to_string[content::PAGE_TYPE_NORMAL] = "NORMAL_PAGE";
+ pagetype_to_string[content::PAGE_TYPE_ERROR] = "ERROR_PAGE";
+ pagetype_to_string[content::PAGE_TYPE_INTERSTITIAL] =
+ "INTERSTITIAL_PAGE";
return_value->SetString("page_type",
pagetype_to_string[nav_entry->page_type()]);