diff options
Diffstat (limited to 'chrome')
340 files changed, 1218 insertions, 1233 deletions
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc index e56e5e9..05fa32f 100644 --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc @@ -511,7 +511,7 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(JNIEnv* env, // GoogleURLTracker uses the navigation pending notification to trigger the // infobar. if (google_util::IsGoogleSearchUrl(fixed_url) && - (page_transition & content::PAGE_TRANSITION_GENERATED)) { + (page_transition & ui::PAGE_TRANSITION_GENERATED)) { GoogleURLTracker* tracker = GoogleURLTrackerFactory::GetForProfile(GetProfile()); if (tracker) @@ -539,7 +539,7 @@ TabAndroid::TabLoadStatus TabAndroid::LoadUrl(JNIEnv* env, base::RefCountedBytes::TakeVector(&post_data); } load_params.transition_type = - content::PageTransitionFromInt(page_transition); + ui::PageTransitionFromInt(page_transition); if (j_referrer_url) { load_params.referrer = content::Referrer( GURL(base::android::ConvertJavaStringToUTF8(env, j_referrer_url)), diff --git a/chrome/browser/apps/app_browsertest_util.h b/chrome/browser/apps/app_browsertest_util.h index ad1ebd7..ceef7ed 100644 --- a/chrome/browser/apps/app_browsertest_util.h +++ b/chrome/browser/apps/app_browsertest_util.h @@ -6,7 +6,6 @@ #define CHROME_BROWSER_APPS_APP_BROWSERTEST_UTIL_H_ #include "chrome/browser/extensions/extension_apitest.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/app_window/app_window.h" namespace base { diff --git a/chrome/browser/apps/app_url_redirector_browsertest.cc b/chrome/browser/apps/app_url_redirector_browsertest.cc index f94aae3..8dfd517 100644 --- a/chrome/browser/apps/app_url_redirector_browsertest.cc +++ b/chrome/browser/apps/app_url_redirector_browsertest.cc @@ -10,11 +10,11 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/ui_test_utils.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_base.h" #include "content/public/test/browser_test_utils.h" #include "extensions/test/extension_test_message_listener.h" #include "net/test/embedded_test_server/embedded_test_server.h" +#include "ui/base/page_transition_types.h" namespace extensions { @@ -92,7 +92,7 @@ class PlatformAppUrlRedirectorBrowserTest : public PlatformAppBrowserTest { // - waits for |handler| to launch and send back a |handler_start_message|; // - finally checks that the resulting app window count is as expected. void TestNavigationInBrowser(const char* matching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* handler, const char* handler_start_message); @@ -100,14 +100,14 @@ class PlatformAppUrlRedirectorBrowserTest : public PlatformAppBrowserTest { // for form submissions, where the URL would normally match the url_handlers // but should not launch it. void TestNegativeNavigationInBrowser(const char* matching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* success_tab_title, const char* handler); // Same as above, but expects the |mismatching_target_page| should not match // any of the |handler|'s url_handlers, and therefor not launch the app. void TestMismatchingNavigationInBrowser(const char* mismatching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* success_tab_title, const char* handler); }; @@ -260,7 +260,7 @@ void PlatformAppUrlRedirectorBrowserTest::TestMismatchingNavigationInApp( void PlatformAppUrlRedirectorBrowserTest::TestNavigationInBrowser( const char* matching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* handler, const char* handler_start_message) { ASSERT_TRUE(StartEmbeddedTestServer()); @@ -283,7 +283,7 @@ void PlatformAppUrlRedirectorBrowserTest::TestNavigationInBrowser( void PlatformAppUrlRedirectorBrowserTest::TestNegativeNavigationInBrowser( const char* matching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* success_tab_title, const char* handler) { ASSERT_TRUE(StartEmbeddedTestServer()); @@ -308,7 +308,7 @@ void PlatformAppUrlRedirectorBrowserTest::TestNegativeNavigationInBrowser( void PlatformAppUrlRedirectorBrowserTest::TestMismatchingNavigationInBrowser( const char* mismatching_target_page, - content::PageTransition transition, + ui::PageTransition transition, const char* success_tab_title, const char* handler) { TestNegativeNavigationInBrowser( @@ -454,7 +454,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppUrlRedirectorBrowserTest, #endif TestNavigationInBrowser( "url_handlers/common/target.html", - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, "url_handlers/handlers/simple", "Handler launched"); } @@ -468,7 +468,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppUrlRedirectorBrowserTest, #endif TestMismatchingNavigationInBrowser( "url_handlers/common/mismatching_target.html", - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, "Mismatching link target loaded", "url_handlers/handlers/simple"); } diff --git a/chrome/browser/apps/ephemeral_app_launcher.cc b/chrome/browser/apps/ephemeral_app_launcher.cc index 5e7f771..ae4b13b 100644 --- a/chrome/browser/apps/ephemeral_app_launcher.cc +++ b/chrome/browser/apps/ephemeral_app_launcher.cc @@ -291,7 +291,7 @@ bool EphemeralAppLauncher::LaunchHostedApp(const Extension* extension) const { chrome::ScopedTabbedBrowserDisplayer displayer( profile(), chrome::GetHostDesktopTypeForNativeWindow(parent_window_)); chrome::NavigateParams params( - displayer.browser(), launch_url, content::PAGE_TRANSITION_AUTO_TOPLEVEL); + displayer.browser(), launch_url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); return true; diff --git a/chrome/browser/apps/install_chrome_app.cc b/chrome/browser/apps/install_chrome_app.cc index 525f31e..6ff3aa6 100644 --- a/chrome/browser/apps/install_chrome_app.cc +++ b/chrome/browser/apps/install_chrome_app.cc @@ -87,7 +87,7 @@ void InstallChromeApp(const std::string& app_id) { content::OpenURLParams params(GetAppInstallUrl(app_id), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false); browser->OpenURL(params); diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc index e240859..12700e91 100644 --- a/chrome/browser/autocomplete/autocomplete_browsertest.cc +++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc @@ -184,7 +184,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, TabAwayRevertSelect) { content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); observer.Wait(); EXPECT_EQ(base::UTF8ToUTF16(url::kAboutBlankURL), omnibox_view->GetText()); chrome::CloseTab(browser()); diff --git a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc index ba1ffca..25b310c 100644 --- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc @@ -382,7 +382,7 @@ void AutocompleteProviderTest::RunKeywordTest(const base::string16& input, match.relevance = 1000; // Arbitrary non-zero value. match.allowed_to_be_default_match = true; match.fill_into_edit = match_data[i].fill_into_edit; - match.transition = content::PAGE_TRANSITION_KEYWORD; + match.transition = ui::PAGE_TRANSITION_KEYWORD; match.keyword = match_data[i].keyword; matches.push_back(match); } diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc index d9c4234..1d0e29e 100644 --- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc @@ -242,8 +242,8 @@ void HistoryQuickProviderTest::FillData() { "INSERT INTO \"visits\" VALUES(%" PRIuS ", %" PRIuS ", %" PRId64 ", 0, %d, 0, 1)", visit_id++, i + 1, visit_time.ToInternalValue(), - (j < cur.typed_count) ? content::PAGE_TRANSITION_TYPED : - content::PAGE_TRANSITION_LINK); + (j < cur.typed_count) ? ui::PAGE_TRANSITION_TYPED : + ui::PAGE_TRANSITION_LINK); sql::Statement sql_stmt(db.GetUniqueStatement(sql_cmd_line.c_str())); EXPECT_TRUE(sql_stmt.Run()); diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc index ed289f7..264392a 100644 --- a/chrome/browser/autocomplete/history_url_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc @@ -462,7 +462,7 @@ TEST_F(HistoryURLProviderTest, CullRedirects) { redirects_to_a.push_back(GURL(test_cases[2].url)); redirects_to_a.push_back(GURL(test_cases[0].url)); history_service_->AddPage(GURL(test_cases[0].url), base::Time::Now(), - NULL, 0, GURL(), redirects_to_a, content::PAGE_TRANSITION_TYPED, + NULL, 0, GURL(), redirects_to_a, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, true); // Because all the results are part of a redirect chain with other results, diff --git a/chrome/browser/autocomplete/shortcuts_backend.cc b/chrome/browser/autocomplete/shortcuts_backend.cc index f5f6148..dda7c5b 100644 --- a/chrome/browser/autocomplete/shortcuts_backend.cc +++ b/chrome/browser/autocomplete/shortcuts_backend.cc @@ -152,7 +152,7 @@ history::ShortcutsDatabase::Shortcut::MatchCore AutocompleteMatch::IsSpecializedSearchType(match.type) ? BaseSearchProvider::CreateSearchSuggestion( match.search_terms_args->search_terms, match_type, - (match.transition == content::PAGE_TRANSITION_KEYWORD), + (match.transition == ui::PAGE_TRANSITION_KEYWORD), match.GetTemplateURL(service, false), UIThreadSearchTermsData(profile)) : match; diff --git a/chrome/browser/autocomplete/shortcuts_provider.cc b/chrome/browser/autocomplete/shortcuts_provider.cc index a69b391..106cf1c 100644 --- a/chrome/browser/autocomplete/shortcuts_provider.cc +++ b/chrome/browser/autocomplete/shortcuts_provider.cc @@ -200,8 +200,7 @@ AutocompleteMatch ShortcutsProvider::ShortcutToACMatch( match.description = shortcut.match_core.description; match.description_class = AutocompleteMatch::ClassificationsFromString( shortcut.match_core.description_class); - match.transition = - static_cast<content::PageTransition>(shortcut.match_core.transition); + match.transition = ui::PageTransitionFromInt(shortcut.match_core.transition); match.type = static_cast<AutocompleteMatch::Type>(shortcut.match_core.type); match.keyword = shortcut.match_core.keyword; match.RecordAdditionalInfo("number of hits", shortcut.number_of_hits); diff --git a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc index f6a86e7..7178cff 100644 --- a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc +++ b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc @@ -53,7 +53,7 @@ struct TestShortcutInfo { std::string contents_class; std::string description; std::string description_class; - content::PageTransition transition; + ui::PageTransition transition; AutocompleteMatch::Type type; std::string keyword; int days_from_now; @@ -61,141 +61,141 @@ struct TestShortcutInfo { } shortcut_test_db[] = { { "BD85DBA2-8C29-49F9-84AE-48E1E90880E0", "goog", "www.google.com", "http://www.google.com/", "Google", "0,1,4,0", "Google", "0,3,4,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E1", "slash", "slashdot.org", "http://slashdot.org/", "slashdot.org", "0,3,5,1", "Slashdot - News for nerds, stuff that matters", "0,2,5,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 0, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 0, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E2", "news", "slashdot.org", "http://slashdot.org/", "slashdot.org", "0,1", "Slashdot - News for nerds, stuff that matters", "0,0,11,2,15,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 0, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 0, 5 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E3", "news", "sports.yahoo.com", "http://sports.yahoo.com/", "sports.yahoo.com", "0,1", "Yahoo! Sports - Sports News, Scores, Rumors, Fantasy Games, and more", - "0,0,23,2,27,0", content::PAGE_TRANSITION_TYPED, + "0,0,23,2,27,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 2, 5 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E4", "news weather", "www.cnn.com/index.html", "http://www.cnn.com/index.html", "www.cnn.com/index.html", "0,1", "CNN.com - Breaking News, U.S., World, Weather, Entertainment & Video", - "0,0,19,2,23,0,38,2,45,0", content::PAGE_TRANSITION_TYPED, + "0,0,19,2,23,0,38,2,45,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 1, 10 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E5", "nhl scores", "sports.yahoo.com", "http://sports.yahoo.com/", "sports.yahoo.com", "0,1", "Yahoo! Sports - Sports News, Scores, Rumors, Fantasy Games, and more", - "0,0,29,2,35,0", content::PAGE_TRANSITION_TYPED, + "0,0,29,2,35,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_BODY, "", 1, 10 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E6", "nhl scores", "www.nhl.com/scores/index.html", "http://www.nhl.com/scores/index.html", "www.nhl.com/scores/index.html", "0,1,4,3,7,1", "January 13, 2010 - NHL.com - Scores", "0,0,19,2,22,0,29,2,35,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 5, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 5, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E7", "just", "www.testsite.com/a.html", "http://www.testsite.com/a.html", "www.testsite.com/a.html", "0,1", "Test - site - just a test", "0,0,14,2,18,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 5, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 5, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E8", "just", "www.testsite.com/b.html", "http://www.testsite.com/b.html", "www.testsite.com/b.html", "0,1", "Test - site - just a test", "0,0,14,2,18,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 5, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 5, 2 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E9", "just", "www.testsite.com/c.html", "http://www.testsite.com/c.html", "www.testsite.com/c.html", "0,1", "Test - site - just a test", "0,0,14,2,18,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 8, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 8, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880EA", "just a", "www.testsite.com/d.html", "http://www.testsite.com/d.html", "www.testsite.com/d.html", "0,1", "Test - site - just a test", "0,0,14,2,18,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 12, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880EB", "just a t", "www.testsite.com/e.html", "http://www.testsite.com/e.html", "www.testsite.com/e.html", "0,1", "Test - site - just a test", - "0,0,14,2,18,0", content::PAGE_TRANSITION_TYPED, + "0,0,14,2,18,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 12, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880EC", "just a te", "www.testsite.com/f.html", "http://www.testsite.com/f.html", "www.testsite.com/f.html", "0,1", "Test - site - just a test", - "0,0,14,2,18,0", content::PAGE_TRANSITION_TYPED, + "0,0,14,2,18,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 12, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880ED", "ago", "www.daysagotest.com/a.html", "http://www.daysagotest.com/a.html", "www.daysagotest.com/a.html", - "0,1,8,3,11,1", "Test - site", "0,0", content::PAGE_TRANSITION_TYPED, + "0,1,8,3,11,1", "Test - site", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880EE", "ago", "www.daysagotest.com/b.html", "http://www.daysagotest.com/b.html", "www.daysagotest.com/b.html", - "0,1,8,3,11,1", "Test - site", "0,0", content::PAGE_TRANSITION_TYPED, + "0,1,8,3,11,1", "Test - site", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 2, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880EF", "ago", "www.daysagotest.com/c.html", "http://www.daysagotest.com/c.html", "www.daysagotest.com/c.html", - "0,1,8,3,11,1", "Test - site", "0,0", content::PAGE_TRANSITION_TYPED, + "0,1,8,3,11,1", "Test - site", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 3, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F0", "ago", "www.daysagotest.com/d.html", "http://www.daysagotest.com/d.html", "www.daysagotest.com/d.html", - "0,1,8,3,11,1", "Test - site", "0,0", content::PAGE_TRANSITION_TYPED, + "0,1,8,3,11,1", "Test - site", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 4, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F1", "echo echo", "echo echo", "chrome-extension://cedabbhfglmiikkmdgcpjdkocfcmbkee/?q=echo", "Run Echo command: echo", "0,0", "Echo", "0,4", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::EXTENSION_APP, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::EXTENSION_APP, "echo", 1, 1 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F2", "abcdef.com", "http://abcdef.com", "http://abcdef.com/", "Abcdef", "0,1,4,0", "Abcdef", "0,3,4,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F3", "query", "query", "https://www.google.com/search?q=query", "query", "0,0", - "Google Search", "0,4", content::PAGE_TRANSITION_GENERATED, + "Google Search", "0,4", ui::PAGE_TRANSITION_GENERATED, AutocompleteMatchType::SEARCH_HISTORY, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F4", "word", "www.word", "https://www.google.com/search?q=www.word", "www.word", "0,0", - "Google Search", "0,4", content::PAGE_TRANSITION_GENERATED, + "Google Search", "0,4", ui::PAGE_TRANSITION_GENERATED, AutocompleteMatchType::SEARCH_HISTORY, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F5", "about:o", "chrome://omnibox", "chrome://omnibox/", "about:omnibox", "0,3,10,1", "", "", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::NAVSUGGEST, "", + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::NAVSUGGEST, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F6", "www/real sp", "http://www/real space/long-url-with-space.html", "http://www/real%20space/long-url-with-space.html", "www/real space/long-url-with-space.html", "0,3,11,1", "Page With Space; Input with Space", "0,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F7", "duplicate", "http://duplicate.com", "http://duplicate.com/", "Duplicate", "0,1", "Duplicate", "0,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F8", "dupl", "http://duplicate.com", "http://duplicate.com/", "Duplicate", "0,1", "Duplicate", "0,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880F9", "notrailing.com/", "http://notrailing.com", "http://notrailing.com/", "No Trailing Slash", "0,1", "No Trailing Slash on fill_into_edit", "0,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880FA", "http:///foo.com", "http://foo.com", "http://foo.com/", "Foo - Typo in Input", "0,1", "Foo - Typo in Input Corrected in fill_into_edit", "0,1", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880FB", "trailing1 ", "http://trailing1.com", "http://trailing1.com/", "Trailing1 - Space in Shortcut", "0,1", - "Trailing1 - Space in Shortcut", "0,1", content::PAGE_TRANSITION_TYPED, + "Trailing1 - Space in Shortcut", "0,1", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880FC", "about:trailing2 ", "chrome://trailing2blah", "chrome://trailing2blah/", "Trailing2 - Space in Shortcut", "0,1", - "Trailing2 - Space in Shortcut", "0,1", content::PAGE_TRANSITION_TYPED, + "Trailing2 - Space in Shortcut", "0,1", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, }; @@ -714,7 +714,7 @@ TEST_F(ShortcutsProviderTest, CalculateScore) { history::ShortcutsDatabase::Shortcut::MatchCore( ASCIIToUTF16("www.test.com"), GURL("http://www.test.com"), ASCIIToUTF16("www.test.com"), "0,1,4,3,8,1", - ASCIIToUTF16("A test"), "0,0,2,2", content::PAGE_TRANSITION_TYPED, + ASCIIToUTF16("A test"), "0,0,2,2", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, base::string16()), base::Time::Now(), 1); @@ -765,19 +765,19 @@ TEST_F(ShortcutsProviderTest, DeleteMatch) { TestShortcutInfo shortcuts_to_test_delete[] = { { "BD85DBA2-8C29-49F9-84AE-48E1E90881F1", "delete", "www.deletetest.com/1", "http://www.deletetest.com/1", "http://www.deletetest.com/1", "0,2", - "Erase this shortcut!", "0,0", content::PAGE_TRANSITION_TYPED, + "Erase this shortcut!", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 1}, { "BD85DBA2-8C29-49F9-84AE-48E1E90881F2", "erase", "www.deletetest.com/1", "http://www.deletetest.com/1", "http://www.deletetest.com/1", "0,2", - "Erase this shortcut!", "0,0", content::PAGE_TRANSITION_TYPED, + "Erase this shortcut!", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 1, 1}, { "BD85DBA2-8C29-49F9-84AE-48E1E90881F3", "keep", "www.deletetest.com/1/2", "http://www.deletetest.com/1/2", "http://www.deletetest.com/1/2", "0,2", - "Keep this shortcut!", "0,0", content::PAGE_TRANSITION_TYPED, + "Keep this shortcut!", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_TITLE, "", 1, 1}, { "BD85DBA2-8C29-49F9-84AE-48E1E90881F4", "delete", "www.deletetest.com/2", "http://www.deletetest.com/2", "http://www.deletetest.com/2", "0,2", - "Erase this shortcut!", "0,0", content::PAGE_TRANSITION_TYPED, + "Erase this shortcut!", "0,0", ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 1, 1}, }; diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc index 41de965..4c2bd54 100644 --- a/chrome/browser/autofill/autofill_browsertest.cc +++ b/chrome/browser/autofill/autofill_browsertest.cc @@ -164,7 +164,7 @@ class AutofillTest : public InProcessBrowserTest { void FillFormAndSubmit(const std::string& filename, const FormMap& data) { GURL url = test_server()->GetURL("files/autofill/" + filename); chrome::NavigateParams params(browser(), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; ui_test_utils::NavigateToURL(¶ms); diff --git a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc index c33b38a..f2fd9ea 100644 --- a/chrome/browser/autofill/autofill_cc_infobar_delegate.cc +++ b/chrome/browser/autofill/autofill_cc_infobar_delegate.cc @@ -106,7 +106,7 @@ bool AutofillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { content::OpenURLParams( GURL(autofill::kHelpURL), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/autofill/content_autofill_driver_browsertest.cc b/chrome/browser/autofill/content_autofill_driver_browsertest.cc index 81f9f10..f40087b 100644 --- a/chrome/browser/autofill/content_autofill_driver_browsertest.cc +++ b/chrome/browser/autofill/content_autofill_driver_browsertest.cc @@ -128,7 +128,7 @@ IN_PROC_BROWSER_TEST_F(ContentAutofillDriverBrowserTest, web_contents_hidden_callback_ = runner->QuitClosure(); chrome::AddSelectedTabWithURL(browser(), GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); runner->Run(); web_contents_hidden_callback_.Reset(); } @@ -145,12 +145,12 @@ IN_PROC_BROWSER_TEST_F(ContentAutofillDriverBrowserTest, browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIBookmarksURL), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); browser()->OpenURL(content::OpenURLParams(GURL(chrome::kChromeUIAboutURL), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); runner->Run(); nav_entry_committed_callback_.Reset(); diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index e263c96..41847f1 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -639,7 +639,7 @@ void BackgroundContentsService::LoadBackgroundContents( // TODO(atwilson): Create RenderViews asynchronously to avoid increasing // startup latency (http://crbug.com/47236). contents->web_contents()->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); } BackgroundContents* BackgroundContentsService::CreateBackgroundContents( diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc index 5666c28..17d88fc 100644 --- a/chrome/browser/browser_commands_unittest.cc +++ b/chrome/browser/browser_commands_unittest.cc @@ -71,7 +71,7 @@ TEST_F(BrowserCommandsTest, DuplicateTab) { content::NavigationController& orig_controller = browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); orig_controller.LoadURL( - url4, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url4, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); EXPECT_EQ(3, orig_controller.GetEntryCount()); EXPECT_TRUE(orig_controller.GetPendingEntry()); @@ -108,7 +108,7 @@ TEST_F(BrowserCommandsTest, ViewSource) { content::NavigationController& orig_controller = browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); orig_controller.LoadURL( - url2, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url2, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); EXPECT_EQ(1, orig_controller.GetEntryCount()); EXPECT_TRUE(orig_controller.GetPendingEntry()); @@ -146,7 +146,7 @@ TEST_F(BrowserCommandsTest, BookmarkCurrentPage) { GURL url1("http://foo/1"); AddTab(browser(), url1); browser()->OpenURL(OpenURLParams( - url1, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url1, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); chrome::BookmarkCurrentPage(browser()); diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc index 1dc599b..0799242 100644 --- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc @@ -408,7 +408,7 @@ class RemoveHistoryTester { void AddHistory(const GURL& url, base::Time time) { history_service_->AddPage(url, time, NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); } diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index a3a454e..24c98fa 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc @@ -1515,7 +1515,7 @@ void CaptivePortalBrowserTest::RunNavigateLoadingTabToTimeoutTest( browser->OpenURL(content::OpenURLParams(timeout_url, content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); portal_observer.WaitForResults(1); EXPECT_FALSE(CheckPending(browser)); @@ -2102,7 +2102,7 @@ IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, DISABLED_TwoWindows) { // window. chrome::NavigateParams params(inactive_browser, GURL(kMockHttpsQuickTimeoutUrl), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); params.disposition = NEW_BACKGROUND_TAB; params.window_action = chrome::NavigateParams::NO_ACTION; ui_test_utils::NavigateToURL(¶ms); diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.cc b/chrome/browser/captive_portal/captive_portal_tab_helper.cc index 2d2c1e1..bd4895b 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.cc +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.cc @@ -100,7 +100,7 @@ void CaptivePortalTabHelper::DidStartProvisionalLoadForFrame( void CaptivePortalTabHelper::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { DCHECK(CalledOnValidThread()); // Ignore subframes. @@ -260,7 +260,7 @@ void CaptivePortalTabHelper::OpenLoginTab() { content::WebContents* web_contents = chrome::AddSelectedTabWithURL( browser, CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); CaptivePortalTabHelper* captive_portal_tab_helper = CaptivePortalTabHelper::FromWebContents(web_contents); captive_portal_tab_helper->SetIsLoginTab(); diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.h b/chrome/browser/captive_portal/captive_portal_tab_helper.h index 5379291..fa4c92c 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper.h +++ b/chrome/browser/captive_portal/captive_portal_tab_helper.h @@ -75,7 +75,7 @@ class CaptivePortalTabHelper virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; virtual void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc index 55b8943..f9884df 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc +++ b/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc @@ -95,7 +95,7 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness { tab_helper().DidCommitProvisionalLoadForFrame( render_view_host->GetMainFrame(), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } // Simulates a connection timeout while requesting |url|. @@ -118,7 +118,7 @@ class CaptivePortalTabHelperTest : public ChromeRenderViewHostTestHarness { tab_helper().DidCommitProvisionalLoadForFrame( render_view_host->GetMainFrame(), GURL(kErrorPageUrl), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } // Simulates an abort while requesting |url|. @@ -267,7 +267,7 @@ TEST_F(CaptivePortalTabHelperTest, HttpTimeoutLinkDoctor) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::OK)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame(main_render_frame1(), GURL(kErrorPageUrl), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); tab_helper().DidStopLoading(render_view_host1()); } @@ -367,7 +367,7 @@ TEST_F(CaptivePortalTabHelperTest, UnexpectedProvisionalLoad) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::ERR_FAILED)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame(main_render_frame2(), GURL(kErrorPageUrl), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } // Similar to the above test, except the original RenderViewHost manages to @@ -403,7 +403,7 @@ TEST_F(CaptivePortalTabHelperTest, UnexpectedCommit) { OnLoadStart(same_site_url.SchemeIsSecure())).Times(1); EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::OK)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame( - main_render_frame1(), same_site_url, content::PAGE_TRANSITION_LINK); + main_render_frame1(), same_site_url, ui::PAGE_TRANSITION_LINK); } // Simulates navigations for a number of subframes, and makes sure no @@ -419,7 +419,7 @@ TEST_F(CaptivePortalTabHelperTest, HttpsSubframe) { // Normal load. tab_helper().DidStartProvisionalLoadForFrame(subframe1, url, false, false); tab_helper().DidCommitProvisionalLoadForFrame( - subframe1, url, content::PAGE_TRANSITION_LINK); + subframe1, url, ui::PAGE_TRANSITION_LINK); // Timeout. content::RenderFrameHost* subframe2 = @@ -468,10 +468,10 @@ TEST_F(CaptivePortalTabHelperTest, HttpsSubframeParallelError) { // Error page load finishes. tab_helper().DidCommitProvisionalLoadForFrame( - subframe, url, content::PAGE_TRANSITION_AUTO_SUBFRAME); + subframe, url, ui::PAGE_TRANSITION_AUTO_SUBFRAME); EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::ERR_UNEXPECTED)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame( - main_render_frame1(), url, content::PAGE_TRANSITION_LINK); + main_render_frame1(), url, ui::PAGE_TRANSITION_LINK); } // Simulates an HTTP to HTTPS redirect, which then times out. @@ -499,7 +499,7 @@ TEST_F(CaptivePortalTabHelperTest, HttpToHttpsRedirectTimeout) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::ERR_TIMED_OUT)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame(main_render_frame1(), GURL(kErrorPageUrl), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } // Simulates an HTTPS to HTTP redirect. @@ -517,7 +517,7 @@ TEST_F(CaptivePortalTabHelperTest, HttpsToHttpRedirect) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::OK)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame( - main_render_frame1(), http_url, content::PAGE_TRANSITION_LINK); + main_render_frame1(), http_url, ui::PAGE_TRANSITION_LINK); } // Simulates an HTTPS to HTTPS redirect. @@ -534,7 +534,7 @@ TEST_F(CaptivePortalTabHelperTest, HttpToHttpRedirect) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::OK)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame( - main_render_frame1(), http_url, content::PAGE_TRANSITION_LINK); + main_render_frame1(), http_url, ui::PAGE_TRANSITION_LINK); } // Tests that a subframe redirect doesn't reset the timer to kick off a captive @@ -552,7 +552,7 @@ TEST_F(CaptivePortalTabHelperTest, SubframeRedirect) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::OK)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame( - main_render_frame1(), GURL(kErrorPageUrl), content::PAGE_TRANSITION_LINK); + main_render_frame1(), GURL(kErrorPageUrl), ui::PAGE_TRANSITION_LINK); } // Simulates a redirect, for another RenderViewHost. @@ -581,7 +581,7 @@ TEST_F(CaptivePortalTabHelperTest, OtherRenderViewHostRedirect) { EXPECT_CALL(mock_reloader(), OnLoadCommitted(net::ERR_TIMED_OUT)).Times(1); tab_helper().DidCommitProvisionalLoadForFrame(main_render_frame1(), GURL(kErrorPageUrl), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } TEST_F(CaptivePortalTabHelperTest, LoginTabLogin) { diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc index 31f6935..b569c562 100644 --- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc +++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc @@ -14,12 +14,12 @@ #include "chrome/grit/generated_resources.h" #include "components/web_modal/popup_manager.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" #include "grit/components_strings.h" #include "ui/aura/window.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/views/border.h" #include "ui/views/controls/styled_label.h" #include "ui/views/layout/fill_layout.h" @@ -137,7 +137,7 @@ void PlatformVerificationDialog::StyledLabelLinkClicked(const gfx::Range& range, Profile* profile = Profile::FromBrowserContext( web_contents_->GetBrowserContext()); chrome::NavigateParams params( - profile, learn_more_url, content::PAGE_TRANSITION_LINK); + profile, learn_more_url, ui::PAGE_TRANSITION_LINK); params.disposition = SINGLETON_TAB; chrome::Navigate(¶ms); } else { diff --git a/chrome/browser/chromeos/dbus/printer_service_provider.cc b/chrome/browser/chromeos/dbus/printer_service_provider.cc index 7813159..f3d8905 100644 --- a/chrome/browser/chromeos/dbus/printer_service_provider.cc +++ b/chrome/browser/chromeos/dbus/printer_service_provider.cc @@ -78,7 +78,7 @@ void FindOrOpenCloudPrintPage(const std::string& /* vendor */, UMA_HISTOGRAM_ENUMERATION("PrinterService.PrinterServiceEvent", PAGE_DISPLAYED, PRINTER_SERVICE_EVENT_MAX); chrome::AddSelectedTabWithURL(displayer.browser(), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } } diff --git a/chrome/browser/chromeos/drive/file_task_executor.cc b/chrome/browser/chromeos/drive/file_task_executor.cc index 9ed721b..7aaf7d36 100644 --- a/chrome/browser/chromeos/drive/file_task_executor.cc +++ b/chrome/browser/chromeos/drive/file_task_executor.cc @@ -44,7 +44,7 @@ class FileTaskExecutorDelegateImpl : public FileTaskExecutorDelegate { chrome::ScopedTabbedBrowserDisplayer displayer( profile_, chrome::HOST_DESKTOP_TYPE_ASH); chrome::AddSelectedTabWithURL(displayer.browser(), open_link, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // Since the ScopedTabbedBrowserDisplayer does not guarantee that the // browser will be shown on the active desktop, we ensure the visibility. multi_user_util::MoveWindowToCurrentDesktop( diff --git a/chrome/browser/chromeos/enrollment_dialog_view.cc b/chrome/browser/chromeos/enrollment_dialog_view.cc index 6de6e28..ac22596 100644 --- a/chrome/browser/chromeos/enrollment_dialog_view.cc +++ b/chrome/browser/chromeos/enrollment_dialog_view.cc @@ -17,10 +17,10 @@ #include "chromeos/network/network_event_log.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/extension_host.h" #include "extensions/common/constants.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/views/controls/label.h" #include "ui/views/layout/grid_layout.h" #include "ui/views/layout/layout_constants.h" @@ -124,7 +124,7 @@ void EnrollmentDialogView::OnClosed() { return; chrome::NavigateParams params(profile_, GURL(target_uri_), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; params.window_action = chrome::NavigateParams::SHOW_WINDOW; chrome::Navigate(¶ms); diff --git a/chrome/browser/chromeos/extensions/echo_private_api.cc b/chrome/browser/chromeos/extensions/echo_private_api.cc index 7f78bd3..8b07620 100644 --- a/chrome/browser/chromeos/extensions/echo_private_api.cc +++ b/chrome/browser/chromeos/extensions/echo_private_api.cc @@ -214,7 +214,7 @@ void EchoPrivateGetUserConsentFunction::OnCancel() { void EchoPrivateGetUserConsentFunction::OnMoreInfoLinkClicked() { chrome::NavigateParams params( - GetProfile(), GURL(kMoreInfoLink), content::PAGE_TRANSITION_LINK); + GetProfile(), GURL(kMoreInfoLink), ui::PAGE_TRANSITION_LINK); // Open the link in a new window. The echo dialog is modal, so the current // window is useless until the dialog is closed. params.disposition = NEW_WINDOW; diff --git a/chrome/browser/chromeos/file_manager/open_with_browser.cc b/chrome/browser/chromeos/file_manager/open_with_browser.cc index 99e3c74..a1cc3c4 100644 --- a/chrome/browser/chromeos/file_manager/open_with_browser.cc +++ b/chrome/browser/chromeos/file_manager/open_with_browser.cc @@ -108,7 +108,7 @@ void OpenNewTab(Profile* profile, const GURL& url) { chrome::ScopedTabbedBrowserDisplayer displayer( profile, chrome::HOST_DESKTOP_TYPE_ASH); chrome::AddSelectedTabWithURL(displayer.browser(), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // Since the ScopedTabbedBrowserDisplayer does not guarantee that the // browser will be shown on the active desktop, we ensure the visibility. diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc index c69b2ed..57f5daf 100644 --- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc +++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc @@ -221,7 +221,7 @@ void DriveWebContentsManager::StartLoad() { web_contents_.get()); content::NavigationController::LoadURLParams load_params(url); - load_params.transition_type = content::PAGE_TRANSITION_GENERATED; + load_params.transition_type = ui::PAGE_TRANSITION_GENERATED; web_contents_->GetController().LoadURLWithParams(load_params); content::WebContentsObserver::Observe(web_contents_.get()); @@ -318,7 +318,7 @@ bool DriveWebContentsManager::ShouldCreateWebContents( contents->web_contents()->GetController().LoadURL( target_url, content::Referrer(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, std::string()); // Return false as we already created the WebContents here. diff --git a/chrome/browser/chromeos/login/signin/merge_session_load_page_unittest.cc b/chrome/browser/chromeos/login/signin/merge_session_load_page_unittest.cc index b23327b..72084a3 100644 --- a/chrome/browser/chromeos/login/signin/merge_session_load_page_unittest.cc +++ b/chrome/browser/chromeos/login/signin/merge_session_load_page_unittest.cc @@ -73,7 +73,7 @@ class MergeSessionLoadPageTest : public ChromeRenderViewHostTestHarness { void Navigate(const char* url, int page_id) { WebContentsTester::For(web_contents())->TestDidNavigate( web_contents()->GetMainFrame(), page_id, GURL(url), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } void ShowInterstitial(const char* url) { @@ -126,7 +126,7 @@ TEST_F(MergeSessionLoadPageTest, MergeSessionPageNotShown) { Navigate(kURL1, 1); // Load next page. controller().LoadURL(GURL(kURL2), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing an merge session interstitial page // to be shown. @@ -144,7 +144,7 @@ TEST_F(MergeSessionLoadPageTest, MergeSessionPageNotShownOnTimeout) { Navigate(kURL1, 1); // Load next page. controller().LoadURL(GURL(kURL2), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing an merge session interstitial page // to be shown. @@ -159,7 +159,7 @@ TEST_F(MergeSessionLoadPageTest, MergeSessionPageShown) { Navigate(kURL1, 1); // Load next page. controller().LoadURL(GURL(kURL2), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing an merge session interstitial page // to be shown. diff --git a/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc b/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc index 66b6272..8376de3 100644 --- a/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc +++ b/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc @@ -34,7 +34,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); OpenURLParams open1(GURL(chrome::kChromeUIAboutURL), content::Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); + CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); browser()->OpenURL(open1); load1.Wait(); @@ -42,7 +42,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); OpenURLParams open2(GURL(chrome::kChromeUICreditsURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false); browser()->OpenURL(open2); load2.Wait(); @@ -51,7 +51,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); OpenURLParams open3(GURL(chrome::kChromeUITermsURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false); browser()->OpenURL(open3); load3.Wait(); @@ -64,7 +64,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); OpenURLParams open4(GURL(chrome::kChromeUIVersionURL), content::Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); browser()->OpenURL(open4); load4.Wait(); @@ -74,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) { content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); OpenURLParams open5(GURL("chrome://dns"), content::Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); browser()->OpenURL(open5); load5.Wait(); diff --git a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc index c94534a..f07205ef 100644 --- a/chrome/browser/chromeos/offline/offline_load_page_unittest.cc +++ b/chrome/browser/chromeos/offline/offline_load_page_unittest.cc @@ -64,7 +64,7 @@ class OfflineLoadPageTest : public ChromeRenderViewHostTestHarness { void Navigate(const char* url, int page_id) { WebContentsTester::For(web_contents())->TestDidNavigate( web_contents()->GetMainFrame(), page_id, GURL(url), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } void ShowInterstitial(const char* url) { @@ -94,7 +94,7 @@ TEST_F(OfflineLoadPageTest, OfflinePageProceed) { Navigate(kURL1, 1); // Load next page. controller().LoadURL(GURL(kURL2), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing an offline browsing interstitial page // to be shown. @@ -122,7 +122,7 @@ TEST_F(OfflineLoadPageTest, OfflinePageDontProceed) { // Start a load. Navigate(kURL1, 1); controller().LoadURL(GURL(kURL2), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing an offline interstitial page to be shown. ShowInterstitial(kURL2); diff --git a/chrome/browser/chromeos/policy/consumer_management_service.cc b/chrome/browser/chromeos/policy/consumer_management_service.cc index 232b8e8..448b97d 100644 --- a/chrome/browser/chromeos/policy/consumer_management_service.cc +++ b/chrome/browser/chromeos/policy/consumer_management_service.cc @@ -38,7 +38,6 @@ #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" -#include "content/public/common/page_transition_types.h" #include "google_apis/gaia/gaia_constants.h" #include "google_apis/gaia/google_service_auth_error.h" #include "grit/generated_resources.h" @@ -46,6 +45,7 @@ #include "policy/proto/device_management_backend.pb.h" #include "third_party/WebKit/public/web/WebTextDirection.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/window_open_disposition.h" #include "ui/message_center/notification.h" @@ -514,7 +514,7 @@ void ConsumerManagementService::ShowDesktopNotificationAndResetStage( void ConsumerManagementService::OpenSettingsPage(Profile* profile) const { const GURL url(chrome::kChromeUISettingsURL); - chrome::NavigateParams params(profile, url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } @@ -523,7 +523,7 @@ void ConsumerManagementService::TryEnrollmentAgain(Profile* profile) const { const GURL base_url(chrome::kChromeUISettingsURL); const GURL url = base_url.Resolve(kConsumerManagementOverlay); - chrome::NavigateParams params(profile, url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc index f663044..f9aa38d 100644 --- a/chrome/browser/crash_recovery_browsertest.cc +++ b/chrome/browser/crash_recovery_browsertest.cc @@ -15,12 +15,12 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_response.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" using content::OpenURLParams; using content::Referrer; @@ -37,7 +37,7 @@ void SimulateRendererCrash(Browser* browser) { content::NotificationService::AllSources()); browser->OpenURL(OpenURLParams( GURL(content::kChromeUICrashURL), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); observer.Wait(); } diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc index 4b830c6..6e06332 100644 --- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc +++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc @@ -122,7 +122,7 @@ bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked( GURL(chrome::kLearnMoreRegisterProtocolHandlerURL), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/devtools/browser_list_tabcontents_provider.cc b/chrome/browser/devtools/browser_list_tabcontents_provider.cc index dcc7157..4ddb06f 100644 --- a/chrome/browser/devtools/browser_list_tabcontents_provider.cc +++ b/chrome/browser/devtools/browser_list_tabcontents_provider.cc @@ -103,7 +103,7 @@ std::string BrowserListTabContentsProvider::GetPageThumbnailData( scoped_ptr<DevToolsTarget> BrowserListTabContentsProvider::CreateNewTarget(const GURL& url) { chrome::NavigateParams params(ProfileManager::GetLastUsedProfile(), - url, content::PAGE_TRANSITION_AUTO_TOPLEVEL); + url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); if (!params.target_contents) diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index 5dafffb..c7d11cd 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc @@ -43,13 +43,13 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/renderer_preferences.h" #include "content/public/common/url_constants.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension_set.h" #include "extensions/common/permissions/permissions_data.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" using base::DictionaryValue; using content::BrowserThread; @@ -208,7 +208,7 @@ void DefaultBindingsDelegate::ActivateWindow() { void DefaultBindingsDelegate::OpenInNewTab(const std::string& url) { content::OpenURLParams params( GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); Browser* browser = FindBrowser(web_contents_); browser->OpenURL(params); } diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc index 78e75f4..072b1e8 100644 --- a/chrome/browser/devtools/devtools_window.cc +++ b/chrome/browser/devtools/devtools_window.cc @@ -44,9 +44,9 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_client.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/url_constants.h" #include "third_party/WebKit/public/web/WebInputEvent.h" +#include "ui/base/page_transition_types.h" #include "ui/events/keycodes/keyboard_codes.h" using base::DictionaryValue; @@ -684,7 +684,7 @@ DevToolsWindow::DevToolsWindow(Profile* profile, main_web_contents_->GetController().LoadURL( DevToolsUIBindings::ApplyThemeToURL(profile, url), content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); bindings_ = DevToolsUIBindings::ForWebContents(main_web_contents_); DCHECK(bindings_); @@ -1044,7 +1044,7 @@ void DevToolsWindow::SetIsDocked(bool dock_requested) { void DevToolsWindow::OpenInNewTab(const std::string& url) { content::OpenURLParams params( GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); WebContents* inspected_web_contents = GetInspectedWebContents(); if (inspected_web_contents) { inspected_web_contents->OpenURL(params); @@ -1142,7 +1142,7 @@ void DevToolsWindow::CreateDevToolsBrowser() { chrome::GetHostDesktopTypeForNativeView( main_web_contents_->GetNativeView()))); browser_->tab_strip_model()->AddWebContents( - main_web_contents_, -1, content::PAGE_TRANSITION_AUTO_TOPLEVEL, + main_web_contents_, -1, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); main_web_contents_->GetRenderViewHost()->SyncRendererPrefs(); } diff --git a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc index 20a5aef..4912f6c 100644 --- a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc +++ b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc @@ -255,7 +255,7 @@ IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest, // Navigate to a URL and wait for the distiller to flush contents to the page. GURL url(dom_distiller::url_utils::GetDistillerViewUrlFromUrl( kDomDistillerScheme, GURL("http://urlthatlooksvalid.com"))); - chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_TYPED); chrome::Navigate(¶ms); distillation_done_runner->Run(); diff --git a/chrome/browser/dom_distiller/tab_utils.cc b/chrome/browser/dom_distiller/tab_utils.cc index 6cf5e14..6b43639 100644 --- a/chrome/browser/dom_distiller/tab_utils.cc +++ b/chrome/browser/dom_distiller/tab_utils.cc @@ -105,7 +105,7 @@ void StartNavigationToDistillerViewer(content::WebContents* web_contents, GURL viewer_url = dom_distiller::url_utils::GetDistillerViewUrlFromUrl( dom_distiller::kDomDistillerScheme, url); content::NavigationController::LoadURLParams params(viewer_url); - params.transition_type = content::PAGE_TRANSITION_AUTO_BOOKMARK; + params.transition_type = ui::PAGE_TRANSITION_AUTO_BOOKMARK; web_contents->GetController().LoadURLWithParams(params); } diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc index b805c4b..67bf169 100644 --- a/chrome/browser/download/chrome_download_manager_delegate.cc +++ b/chrome/browser/download/chrome_download_manager_delegate.cc @@ -450,7 +450,7 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) { net::FilePathToFileURL(download->GetTargetFilePath()), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); browser->OpenURL(params); RecordDownloadOpenMethod(DOWNLOAD_OPEN_METHOD_DEFAULT_BROWSER); diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc index 1262e0a..bb67541 100644 --- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc +++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc @@ -218,7 +218,7 @@ content::MockDownloadItem* ON_CALL(*item, GetTargetFilePath()) .WillByDefault(ReturnRefOfCopy(base::FilePath())); ON_CALL(*item, GetTransitionType()) - .WillByDefault(Return(content::PAGE_TRANSITION_LINK)); + .WillByDefault(Return(ui::PAGE_TRANSITION_LINK)); ON_CALL(*item, GetWebContents()) .WillByDefault(Return(web_contents())); ON_CALL(*item, HasUserGesture()) diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 316d7e72..b939bf0 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -78,7 +78,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" #include "content/public/common/context_menu_params.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/download_test_observer.h" #include "content/public/test/test_file_error_injector.h" @@ -91,6 +90,7 @@ #include "net/test/url_request/url_request_mock_http_job.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #if defined(FULL_SAFE_BROWSING) #include "chrome/browser/safe_browsing/download_feedback_service.h" @@ -1342,7 +1342,7 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, PerWindowShelf) { EXPECT_NE(static_cast<WebContents*>(NULL), chrome::AddSelectedTabWithURL(browser(), GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_TYPED)); + ui::PAGE_TRANSITION_TYPED)); EXPECT_EQ(2, browser()->tab_strip_model()->count()); EXPECT_TRUE(browser()->window()->IsDownloadShelfVisible()); diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc index 7486661..407bab0 100644 --- a/chrome/browser/download/download_request_limiter.cc +++ b/chrome/browser/download/download_request_limiter.cc @@ -205,7 +205,7 @@ void DownloadRequestLimiter::TabDownloadState::Observe( return; // Redirects don't count. - if (content::PageTransitionIsRedirect(entry->GetTransitionType())) + if (ui::PageTransitionIsRedirect(entry->GetTransitionType())) return; if (status_ == DownloadRequestLimiter::ALLOW_ALL_DOWNLOADS || diff --git a/chrome/browser/download/download_shelf_context_menu.cc b/chrome/browser/download/download_shelf_context_menu.cc index 7e39b8b..81d7a4e 100644 --- a/chrome/browser/download/download_shelf_context_menu.cc +++ b/chrome/browser/download/download_shelf_context_menu.cc @@ -217,7 +217,7 @@ void DownloadShelfContextMenu::ExecuteCommand(int command_id, int event_flags) { content::OpenURLParams(GURL(chrome::kDownloadInterruptedLearnMoreURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); break; } diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc index c0f44b6..c750432 100644 --- a/chrome/browser/download/download_target_determiner.cc +++ b/chrome/browser/download/download_target_determiner.cc @@ -849,7 +849,7 @@ bool DownloadTargetDeterminer::IsDangerousFile(PriorVisitsToReferrer visits) { // "Allow on user gesture" is OK when we have a user gesture and the // hosting page has been visited before today. if (download_->GetTransitionType() & - content::PAGE_TRANSITION_FROM_ADDRESS_BAR) { + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) { return false; } return !download_->HasUserGesture() || visits == NO_VISITS_TO_REFERRER; diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc index 06ed1f2..ebfaf26 100644 --- a/chrome/browser/download/download_target_determiner_unittest.cc +++ b/chrome/browser/download/download_target_determiner_unittest.cc @@ -318,7 +318,7 @@ DownloadTargetDeterminerTest::CreateActiveDownloadItem( ON_CALL(*item, GetTargetFilePath()) .WillByDefault(ReturnRefOfCopy(base::FilePath())); ON_CALL(*item, GetTransitionType()) - .WillByDefault(Return(content::PAGE_TRANSITION_LINK)); + .WillByDefault(Return(ui::PAGE_TRANSITION_LINK)); ON_CALL(*item, GetURL()) .WillByDefault(ReturnRefOfCopy(download_url)); ON_CALL(*item, GetUrlChain()) diff --git a/chrome/browser/extensions/active_tab_unittest.cc b/chrome/browser/extensions/active_tab_unittest.cc index efa00dc..eebdfe3 100644 --- a/chrome/browser/extensions/active_tab_unittest.cc +++ b/chrome/browser/extensions/active_tab_unittest.cc @@ -22,7 +22,6 @@ #include "content/public/browser/notification_types.h" #include "content/public/browser/web_contents.h" #include "content/public/common/frame_navigate_params.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/test_browser_thread.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc index 6d9ec59..1ac2b66 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc @@ -39,7 +39,6 @@ #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/download_test_observer.h" #include "content/test/net/url_request_slow_download_job.h" #include "extensions/browser/event_router.h" @@ -54,6 +53,7 @@ #include "storage/browser/fileapi/file_system_context.h" #include "storage/browser/fileapi/file_system_operation_runner.h" #include "storage/browser/fileapi/file_system_url.h" +#include "ui/base/page_transition_types.h" using content::BrowserContext; using content::BrowserThread; @@ -275,7 +275,7 @@ class DownloadExtensionTest : public ExtensionApiTest { content::WebContents* tab = chrome::AddSelectedTabWithURL( current_browser(), extension_->GetResourceURL("empty.html"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); EventRouter::Get(current_browser()->profile()) ->AddEventListener(downloads::OnCreated::kEventName, tab->GetRenderProcessHost(), @@ -296,7 +296,7 @@ class DownloadExtensionTest : public ExtensionApiTest { content::WebContents* tab = chrome::AddSelectedTabWithURL( current_browser(), extension_->GetResourceURL("empty.html"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); EventRouter::Get(current_browser()->profile()) ->AddEventListener(downloads::OnDeterminingFilename::kEventName, tab->GetRenderProcessHost(), @@ -586,7 +586,7 @@ class DownloadExtensionTest : public ExtensionApiTest { content::WebContents* tab = chrome::AddSelectedTabWithURL( current_browser(), extension_->GetResourceURL("empty.html"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); function->set_extension(extension_); function->SetRenderViewHost(tab->GetRenderViewHost()); } diff --git a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc index 40f349a2..9c18248 100644 --- a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc +++ b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc @@ -99,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TestOpenPopup) { new_browser = chrome::FindBrowserWithWebContents( browser()->OpenURL(content::OpenURLParams( GURL("about:"), content::Referrer(), NEW_WINDOW, - content::PAGE_TRANSITION_TYPED, false))); + ui::PAGE_TRANSITION_TYPED, false))); #if defined(OS_WIN) // Hide all the buttons to test that it opens even when browser action is // in the overflow bucket. @@ -339,7 +339,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, Browser* new_browser = chrome::FindBrowserWithWebContents( browser()->OpenURL(content::OpenURLParams( GURL("about:"), content::Referrer(), NEW_WINDOW, - content::PAGE_TRANSITION_TYPED, false))); + ui::PAGE_TRANSITION_TYPED, false))); // Forcibly closing the browser HWND should not cause a crash. EXPECT_EQ(TRUE, ::CloseWindow(hwnd)); diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc index 381dacd..dfedb0d 100644 --- a/chrome/browser/extensions/api/history/history_api.cc +++ b/chrome/browser/extensions/api/history/history_api.cc @@ -86,38 +86,38 @@ scoped_ptr<VisitItem> GetVisitItem(const history::VisitRow& row) { visit_item->referring_visit_id = base::Int64ToString(row.referring_visit); VisitItem::Transition transition = VisitItem::TRANSITION_LINK; - switch (row.transition & content::PAGE_TRANSITION_CORE_MASK) { - case content::PAGE_TRANSITION_LINK: + switch (row.transition & ui::PAGE_TRANSITION_CORE_MASK) { + case ui::PAGE_TRANSITION_LINK: transition = VisitItem::TRANSITION_LINK; break; - case content::PAGE_TRANSITION_TYPED: + case ui::PAGE_TRANSITION_TYPED: transition = VisitItem::TRANSITION_TYPED; break; - case content::PAGE_TRANSITION_AUTO_BOOKMARK: + case ui::PAGE_TRANSITION_AUTO_BOOKMARK: transition = VisitItem::TRANSITION_AUTO_BOOKMARK; break; - case content::PAGE_TRANSITION_AUTO_SUBFRAME: + case ui::PAGE_TRANSITION_AUTO_SUBFRAME: transition = VisitItem::TRANSITION_AUTO_SUBFRAME; break; - case content::PAGE_TRANSITION_MANUAL_SUBFRAME: + case ui::PAGE_TRANSITION_MANUAL_SUBFRAME: transition = VisitItem::TRANSITION_MANUAL_SUBFRAME; break; - case content::PAGE_TRANSITION_GENERATED: + case ui::PAGE_TRANSITION_GENERATED: transition = VisitItem::TRANSITION_GENERATED; break; - case content::PAGE_TRANSITION_AUTO_TOPLEVEL: + case ui::PAGE_TRANSITION_AUTO_TOPLEVEL: transition = VisitItem::TRANSITION_AUTO_TOPLEVEL; break; - case content::PAGE_TRANSITION_FORM_SUBMIT: + case ui::PAGE_TRANSITION_FORM_SUBMIT: transition = VisitItem::TRANSITION_FORM_SUBMIT; break; - case content::PAGE_TRANSITION_RELOAD: + case ui::PAGE_TRANSITION_RELOAD: transition = VisitItem::TRANSITION_RELOAD; break; - case content::PAGE_TRANSITION_KEYWORD: + case ui::PAGE_TRANSITION_KEYWORD: transition = VisitItem::TRANSITION_KEYWORD; break; - case content::PAGE_TRANSITION_KEYWORD_GENERATED: + case ui::PAGE_TRANSITION_KEYWORD_GENERATED: transition = VisitItem::TRANSITION_KEYWORD_GENERATED; break; default: diff --git a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc index 9ab0684..2142e8f 100644 --- a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc +++ b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc @@ -174,7 +174,7 @@ void ChromeRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { new Browser(Browser::CreateParams(profile, chrome::GetActiveDesktop())); chrome::NavigateParams params( - browser, uninstall_url, content::PAGE_TRANSITION_CLIENT_REDIRECT); + browser, uninstall_url, ui::PAGE_TRANSITION_CLIENT_REDIRECT); params.disposition = NEW_FOREGROUND_TAB; params.user_gesture = false; chrome::Navigate(¶ms); diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc index 8bc8145..3714c2b 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc @@ -118,7 +118,7 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_GetUserMediaTest) { content::OpenURLParams params(GURL("about:blank"), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); content::RenderFrameHost* const main_frame = web_contents->GetMainFrame(); @@ -154,7 +154,7 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ActiveTabPermission) { EXPECT_TRUE(before_open_tab.WaitUntilSatisfied()); content::OpenURLParams params(GURL("http://google.com"), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); before_open_tab.Reply(""); @@ -207,7 +207,7 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_FullscreenEvents) { content::OpenURLParams params(GURL("chrome://version"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); ExtensionTestMessageListener listeners_setup("ready1", true); @@ -252,7 +252,7 @@ IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_GrantForChromePages) { // Open a tab on a chrome:// page and make sure we can capture. content::OpenURLParams params(GURL("chrome://version"), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); const Extension* extension = ExtensionRegistry::Get( web_contents->GetBrowserContext())->enabled_extensions().GetByID( diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc index 93d8e5e..346b688 100644 --- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc +++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc @@ -197,7 +197,7 @@ void AshPanelContents::LoadContents(int32 creator_process_id) { host_, Profile::FromBrowserContext(host_->browser_context()))); web_contents_->GetController().LoadURL( - url_, content::Referrer(), content::PAGE_TRANSITION_LINK, + url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); } diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index 6fc19f7..2f2ce6c 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -559,7 +559,7 @@ bool WindowsCreateFunction::RunSync() { for (std::vector<GURL>::iterator i = urls.begin(); i != urls.end(); ++i) { WebContents* tab = chrome::AddSelectedTabWithURL( - new_window, *i, content::PAGE_TRANSITION_LINK); + new_window, *i, ui::PAGE_TRANSITION_LINK); if (create_panel) { TabHelper::FromWebContents(tab)->SetExtensionAppIconById(extension_id); } @@ -1250,7 +1250,7 @@ bool TabsUpdateFunction::UpdateURL(const std::string &url_string, } web_contents_->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); // The URL of a tab contents never actually changes to a JavaScript URL, so // this check only makes sense in other cases. @@ -1466,7 +1466,7 @@ bool TabsReloadFunction::RunSync() { // This does as same as Browser::ReloadInternal. NavigationEntry* entry = web_contents->GetController().GetVisibleEntry(); OpenURLParams params(entry->GetURL(), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_RELOAD, false); + ui::PAGE_TRANSITION_RELOAD, false); GetCurrentBrowser()->OpenURL(params); } else if (bypass_cache) { web_contents->GetController().ReloadIgnoringCache(true); diff --git a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc index 674ffbd..98d9aa7 100644 --- a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc @@ -83,7 +83,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DISABLED_QueryLastFocusedWindowTabs) { content::RunAllPendingInMessageLoop(); GURL url; - AddTabAtIndexToBrowser(focused_window, 0, url, content::PAGE_TRANSITION_LINK); + AddTabAtIndexToBrowser(focused_window, 0, url, ui::PAGE_TRANSITION_LINK); int focused_window_id = extensions::ExtensionTabUtil::GetWindowId(focused_window); diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc index 38b0431..f890355 100644 --- a/chrome/browser/extensions/api/tabs/tabs_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_test.cc @@ -398,7 +398,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryCurrentWindowTabs) { CreateBrowser(browser()->profile()); GURL url(url::kAboutBlankURL); - AddTabAtIndexToBrowser(browser(), 0, url, content::PAGE_TRANSITION_LINK); + AddTabAtIndexToBrowser(browser(), 0, url, ui::PAGE_TRANSITION_LINK); int window_id = ExtensionTabUtil::GetWindowId(browser()); // Get tabs in the 'current' window called from non-focused browser. @@ -517,7 +517,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DuplicateTab) { content::OpenURLParams params(GURL(url::kAboutBlankURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); int tab_id = ExtensionTabUtil::GetTabId(web_contents); @@ -561,7 +561,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DuplicateTabNoPermission) { content::OpenURLParams params(GURL(url::kAboutBlankURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); content::WebContents* web_contents = browser()->OpenURL(params); int tab_id = ExtensionTabUtil::GetTabId(web_contents); @@ -767,7 +767,7 @@ content::OpenURLParams GetOpenParams(const char* url) { return content::OpenURLParams(GURL(url), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); } diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc index ec17b8a..24a4de3 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc @@ -367,7 +367,7 @@ void WebNavigationTabObserver::DidStartProvisionalLoadForFrame( void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { content::RenderViewHost* render_view_host = render_frame_host->GetRenderViewHost(); DVLOG(2) << "DidCommitProvisionalLoad(" @@ -423,8 +423,8 @@ void WebNavigationTabObserver::DidCommitProvisionalLoadForFrame( transition_type); } else { if (navigation_state_.GetIsServerRedirected(render_frame_host)) { - transition_type = static_cast<content::PageTransition>( - transition_type | content::PAGE_TRANSITION_SERVER_REDIRECT); + transition_type = ui::PageTransitionFromInt( + transition_type | ui::PAGE_TRANSITION_SERVER_REDIRECT); } helpers::DispatchOnCommitted(web_navigation::OnCommitted::kEventName, web_contents(), @@ -575,7 +575,7 @@ void WebNavigationTabObserver::DidOpenRequestedURL( const GURL& url, const content::Referrer& referrer, WindowOpenDisposition disposition, - content::PageTransition transition, + ui::PageTransition transition, int64 source_frame_num) { content::RenderFrameHost* render_frame_host = content::RenderFrameHost::FromID(render_view_host_->GetProcess()->GetID(), diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h index 0df3d7c..241387d 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h @@ -66,7 +66,7 @@ class WebNavigationTabObserver virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; virtual void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, @@ -87,7 +87,7 @@ class WebNavigationTabObserver const GURL& url, const content::Referrer& referrer, WindowOpenDisposition disposition, - content::PageTransition transition, + ui::PageTransition transition, int64 source_frame_num) OVERRIDE; virtual void WebContentsDestroyed() OVERRIDE; diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc index c9266a7..e9e90fa 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc @@ -18,10 +18,10 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/event_router.h" #include "extensions/common/event_filtering_info.h" #include "net/base/net_errors.h" +#include "ui/base/page_transition_types.h" namespace extensions { @@ -93,7 +93,7 @@ void DispatchOnCommitted(const std::string& event_name, content::WebContents* web_contents, content::RenderFrameHost* frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { scoped_ptr<base::ListValue> args(new base::ListValue()); base::DictionaryValue* dict = new base::DictionaryValue(); dict->SetInteger(keys::kTabIdKey, ExtensionTabUtil::GetTabId(web_contents)); @@ -101,21 +101,21 @@ void DispatchOnCommitted(const std::string& event_name, dict->SetInteger(keys::kProcessIdKey, frame_host->GetProcess()->GetID()); dict->SetInteger(keys::kFrameIdKey, GetFrameId(frame_host)); std::string transition_type_string = - content::PageTransitionGetCoreTransitionString(transition_type); + ui::PageTransitionGetCoreTransitionString(transition_type); // For webNavigation API backward compatibility, keep "start_page" even after // renamed to "auto_toplevel". - if (PageTransitionStripQualifier(transition_type) == - content::PAGE_TRANSITION_AUTO_TOPLEVEL) + if (ui::PageTransitionStripQualifier(transition_type) == + ui::PAGE_TRANSITION_AUTO_TOPLEVEL) transition_type_string = "start_page"; dict->SetString(keys::kTransitionTypeKey, transition_type_string); base::ListValue* qualifiers = new base::ListValue(); - if (transition_type & content::PAGE_TRANSITION_CLIENT_REDIRECT) + if (transition_type & ui::PAGE_TRANSITION_CLIENT_REDIRECT) qualifiers->Append(new base::StringValue("client_redirect")); - if (transition_type & content::PAGE_TRANSITION_SERVER_REDIRECT) + if (transition_type & ui::PAGE_TRANSITION_SERVER_REDIRECT) qualifiers->Append(new base::StringValue("server_redirect")); - if (transition_type & content::PAGE_TRANSITION_FORWARD_BACK) + if (transition_type & ui::PAGE_TRANSITION_FORWARD_BACK) qualifiers->Append(new base::StringValue("forward_back")); - if (transition_type & content::PAGE_TRANSITION_FROM_ADDRESS_BAR) + if (transition_type & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) qualifiers->Append(new base::StringValue("from_address_bar")); dict->Set(keys::kTransitionQualifiersKey, qualifiers); dict->SetDouble(keys::kTimeStampKey, MilliSecondsFromTime(base::Time::Now())); diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h index 50c30e1..ab7890a 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h @@ -8,7 +8,7 @@ #include <string> #include "base/basictypes.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" namespace content { class BrowserContext; @@ -36,7 +36,7 @@ void DispatchOnCommitted(const std::string& event_name, content::WebContents* web_contents, content::RenderFrameHost* frame_host, const GURL& url, - content::PageTransition transition_type); + ui::PageTransition transition_type); void DispatchOnDOMContentLoaded(content::WebContents* web_contents, content::RenderFrameHost* frame_host, diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc index efc9a12..ef63165 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc @@ -192,7 +192,7 @@ class DelayLoadStartAndExecuteJavascript virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE { + ui::PageTransition transition_type) OVERRIDE { if (script_was_executed_ && EndsWith(url.spec(), until_url_suffix_, true)) { content::WebContentsObserver::Observe(NULL); test_navigation_listener_->ResumeAll(); @@ -484,7 +484,7 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, TargetBlank) { GURL url = embedded_test_server()->GetURL( "/extensions/api_test/webnavigation/targetBlank/a.html"); - chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK); ui_test_utils::NavigateToURL(¶ms); // There's a link with target=_blank on a.html. Click on it to open it in a diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc index 62eebda..887285e 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -38,7 +38,6 @@ #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/referrer.h" #include "extensions/browser/extension_function_dispatcher.h" #include "extensions/browser/extension_prefs.h" diff --git a/chrome/browser/extensions/chrome_ui_overrides_browsertest.cc b/chrome/browser/extensions/chrome_ui_overrides_browsertest.cc index 079b0a5..66fde53 100644 --- a/chrome/browser/extensions/chrome_ui_overrides_browsertest.cc +++ b/chrome/browser/extensions/chrome_ui_overrides_browsertest.cc @@ -22,6 +22,6 @@ IN_PROC_BROWSER_TEST_F(ChromeUIOverridesBrowserTest, AddTabAtIndex(1, GURL(chrome::kChromeUINewTabURL), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); EXPECT_FALSE(chrome::IsCommandEnabled(browser(), IDC_BOOKMARK_ALL_TABS)); } diff --git a/chrome/browser/extensions/content_verifier_browsertest.cc b/chrome/browser/extensions/content_verifier_browsertest.cc index 489b95e..4cd57f3 100644 --- a/chrome/browser/extensions/content_verifier_browsertest.cc +++ b/chrome/browser/extensions/content_verifier_browsertest.cc @@ -121,7 +121,7 @@ class ContentVerifierTest : public ExtensionBrowserTest { } virtual void OpenPageAndWaitForUnload() { - AddTabAtIndex(1, page_url_, content::PAGE_TRANSITION_LINK); + AddTabAtIndex(1, page_url_, ui::PAGE_TRANSITION_LINK); unload_observer_->WaitForUnload(id_); ExtensionPrefs* prefs = ExtensionPrefs::Get(profile()); int reasons = prefs->GetDisableReasons(id_); diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc index fd45c24..9ccabe9 100644 --- a/chrome/browser/extensions/extension_context_menu_model.cc +++ b/chrome/browser/extensions/extension_context_menu_model.cc @@ -187,7 +187,7 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id, case NAME: { OpenURLParams params(extensions::ManifestURL::GetHomepageURL(extension), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); browser_->OpenURL(params); break; } diff --git a/chrome/browser/extensions/extension_loading_browsertest.cc b/chrome/browser/extensions/extension_loading_browsertest.cc index dc22e84..6f98393 100644 --- a/chrome/browser/extensions/extension_loading_browsertest.cc +++ b/chrome/browser/extensions/extension_loading_browsertest.cc @@ -80,7 +80,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionLoadingTest, // to crash, so open a new tab to wait long enough. AddTabAtIndex(browser()->tab_strip_model()->count(), GURL("http://www.google.com/"), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); // Check that the extension hasn't crashed. ExtensionRegistry* registry = ExtensionRegistry::Get(profile()); diff --git a/chrome/browser/extensions/extension_message_bubble_controller.cc b/chrome/browser/extensions/extension_message_bubble_controller.cc index 1917156..4c23702 100644 --- a/chrome/browser/extensions/extension_message_bubble_controller.cc +++ b/chrome/browser/extensions/extension_message_bubble_controller.cc @@ -130,7 +130,7 @@ void ExtensionMessageBubbleController::OnLinkClicked() { content::OpenURLParams(delegate_->GetLearnMoreUrl(), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } AcknowledgeExtensions(); diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc index 46ca9f3..3d38e4f 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc @@ -233,7 +233,7 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab( if (pinned) add_types |= TabStripModel::ADD_PINNED; chrome::NavigateParams navigate_params( - browser, url, content::PAGE_TRANSITION_LINK); + browser, url, ui::PAGE_TRANSITION_LINK); navigate_params.disposition = active ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; navigate_params.tabstrip_index = index; @@ -610,7 +610,7 @@ void ExtensionTabUtil::OpenOptionsPage(const Extension* extension, content::OpenURLParams params(OptionsPageInfo::GetOptionsPage(extension), content::Referrer(), SINGLETON_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); browser->OpenURL(params); browser->window()->Show(); diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc index d75eaae..166b8a8 100644 --- a/chrome/browser/extensions/extension_web_ui.cc +++ b/chrome/browser/extensions/extension_web_ui.cc @@ -26,7 +26,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/bindings_policy.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/image_loader.h" #include "extensions/common/extension.h" @@ -36,6 +35,7 @@ #include "extensions/common/manifest_handlers/incognito_info.h" #include "net/base/file_stream.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/page_transition_types.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/favicon_size.h" #include "ui/gfx/image/image_skia.h" @@ -81,7 +81,7 @@ void UnregisterAndReplaceOverrideForWebContents(const std::string& page, // NavigationController has. web_contents->GetController().LoadURL( url, content::Referrer(url, blink::WebReferrerPolicyDefault), - content::PAGE_TRANSITION_RELOAD, std::string()); + ui::PAGE_TRANSITION_RELOAD, std::string()); } // Run favicon callbck with image result. If no favicon was available then @@ -170,7 +170,7 @@ ExtensionWebUI::ExtensionWebUI(content::WebUI* web_ui, const GURL& url) new extensions::BookmarkManagerPrivateDragEventRouter( profile, web_ui->GetWebContents())); - web_ui->SetLinkTransitionType(content::PAGE_TRANSITION_AUTO_BOOKMARK); + web_ui->SetLinkTransitionType(ui::PAGE_TRANSITION_AUTO_BOOKMARK); } } diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc index fcdce7c..2d58fad 100644 --- a/chrome/browser/extensions/webstore_inline_installer.cc +++ b/chrome/browser/extensions/webstore_inline_installer.cc @@ -99,7 +99,7 @@ bool WebstoreInlineInstaller::CheckInlineInstallPermitted( GURL(redirect_url), content::Referrer(web_contents()->GetURL(), blink::WebReferrerPolicyDefault), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); *error = kInlineInstallSupportedError; return false; } diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc index 313923a..cb55a62 100644 --- a/chrome/browser/extensions/window_open_apitest.cc +++ b/chrome/browser/extensions/window_open_apitest.cc @@ -219,11 +219,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PopupBlockingHostedApp) { .ReplaceComponents(replace_host); browser()->OpenURL(OpenURLParams( - open_tab, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, + open_tab, Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false)); browser()->OpenURL(OpenURLParams( open_popup, Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1, 0)); } diff --git a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc index ee63eca..8d2e30e 100644 --- a/chrome/browser/geolocation/geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/geolocation_permission_context_unittest.cc @@ -218,7 +218,7 @@ void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { content::WebContents* new_tab = content::WebContents::Create( content::WebContents::CreateParams(profile())); new_tab->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); content::RenderViewHostTester::For(new_tab->GetRenderViewHost())-> SendNavigate(extra_tabs_.size() + 1, url); diff --git a/chrome/browser/google/google_search_counter.cc b/chrome/browser/google/google_search_counter.cc index 56ec4a6..9f4cced 100644 --- a/chrome/browser/google/google_search_counter.cc +++ b/chrome/browser/google/google_search_counter.cc @@ -30,8 +30,8 @@ GoogleSearchCounter::GetGoogleSearchAccessPointForSearchNavEntry( // If the |entry| is FROM_ADDRESS_BAR, it comes from the omnibox; if it's // GENERATED, the user was doing a search, rather than doing a navigation to a // search URL (e.g. from hisotry, or pasted in). - if (entry.GetTransitionType() == (content::PAGE_TRANSITION_GENERATED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR)) { + if (entry.GetTransitionType() == (ui::PAGE_TRANSITION_GENERATED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)) { return GoogleSearchMetrics::AP_OMNIBOX; } diff --git a/chrome/browser/google/google_search_counter_android_unittest.cc b/chrome/browser/google/google_search_counter_android_unittest.cc index dfd2c58..865c471 100644 --- a/chrome/browser/google/google_search_counter_android_unittest.cc +++ b/chrome/browser/google/google_search_counter_android_unittest.cc @@ -95,9 +95,9 @@ void GoogleSearchCounterAndroidTest::TestGoogleSearch( scoped_ptr<content::NavigationEntry> entry( content::NavigationEntry::Create()); if (is_omnibox) { - entry->SetTransitionType(content::PageTransitionFromInt( - content::PAGE_TRANSITION_GENERATED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); + entry->SetTransitionType(ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_GENERATED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); } entry->SetURL(GURL(url)); details.entry = entry.get(); diff --git a/chrome/browser/google/google_search_counter_unittest.cc b/chrome/browser/google/google_search_counter_unittest.cc index df8731c..faee2ef 100644 --- a/chrome/browser/google/google_search_counter_unittest.cc +++ b/chrome/browser/google/google_search_counter_unittest.cc @@ -76,9 +76,9 @@ void GoogleSearchCounterTest::TestGoogleSearch( scoped_ptr<content::NavigationEntry> entry( content::NavigationEntry::Create()); if (is_omnibox) { - entry->SetTransitionType(content::PageTransitionFromInt( - content::PAGE_TRANSITION_GENERATED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); + entry->SetTransitionType(ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_GENERATED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); } entry->SetURL(GURL(url)); details.entry = entry.get(); diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc index b61d027..080f611 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc +++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc @@ -72,8 +72,8 @@ void GoogleURLTrackerNavigationHelperImpl::OpenURL( GURL url, WindowOpenDisposition disposition, bool user_clicked_on_link) { - content::PageTransition transition_type = user_clicked_on_link ? - content::PAGE_TRANSITION_LINK : content::PAGE_TRANSITION_GENERATED; + ui::PageTransition transition_type = user_clicked_on_link ? + ui::PAGE_TRANSITION_LINK : ui::PAGE_TRANSITION_GENERATED; web_contents_->OpenURL(content::OpenURLParams( url, content::Referrer(), disposition, transition_type, false)); } diff --git a/chrome/browser/gpu/three_d_api_observer.cc b/chrome/browser/gpu/three_d_api_observer.cc index 13f5eff..0f92631 100644 --- a/chrome/browser/gpu/three_d_api_observer.cc +++ b/chrome/browser/gpu/three_d_api_observer.cc @@ -150,7 +150,7 @@ bool ThreeDAPIInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { GURL("https://support.google.com/chrome/?p=ib_webgl"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/history/android/android_provider_backend.cc b/chrome/browser/history/android/android_provider_backend.cc index 7fc745b..bfb9019 100644 --- a/chrome/browser/history/android/android_provider_backend.cc +++ b/chrome/browser/history/android/android_provider_backend.cc @@ -17,7 +17,6 @@ #include "chrome/browser/history/thumbnail_database.h" #include "components/history/core/browser/history_client.h" #include "components/history/core/browser/keyword_search_term.h" -#include "content/public/common/page_transition_types.h" #include "sql/connection.h" diff --git a/chrome/browser/history/android/android_provider_backend_unittest.cc b/chrome/browser/history/android/android_provider_backend_unittest.cc index e1c8d76..efc8ecc 100644 --- a/chrome/browser/history/android/android_provider_backend_unittest.cc +++ b/chrome/browser/history/android/android_provider_backend_unittest.cc @@ -224,20 +224,20 @@ TEST_F(AndroidProviderBackendTest, UpdateTables) { std::vector<VisitInfo> visits1; Time last_visited1 = Time::Now() - TimeDelta::FromDays(1); Time created1 = last_visited1 - TimeDelta::FromDays(20); - visits1.push_back(VisitInfo(created1, content::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(created1, ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo(last_visited1 - TimeDelta::FromDays(1), - content::PAGE_TRANSITION_LINK)); - visits1.push_back(VisitInfo(last_visited1, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(last_visited1, ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); URLID url_id2 = 0; std::vector<VisitInfo> visits2; Time last_visited2 = Time::Now(); Time created2 = last_visited2 - TimeDelta::FromDays(10); - visits2.push_back(VisitInfo(created2, content::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(created2, ui::PAGE_TRANSITION_LINK)); visits2.push_back(VisitInfo(last_visited2 - TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); - visits2.push_back(VisitInfo(last_visited2, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(last_visited2, ui::PAGE_TRANSITION_LINK)); // Add a bookmark which is not in the history. GURL url3("http://www.bookmark.com"); @@ -366,20 +366,20 @@ TEST_F(AndroidProviderBackendTest, QueryHistoryAndBookmarks) { std::vector<VisitInfo> visits1; Time last_visited1 = Time::Now() - TimeDelta::FromDays(1); Time created1 = last_visited1 - TimeDelta::FromDays(20); - visits1.push_back(VisitInfo(created1, content::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(created1, ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo(last_visited1 - TimeDelta::FromDays(1), - content::PAGE_TRANSITION_LINK)); - visits1.push_back(VisitInfo(last_visited1, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(last_visited1, ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); std::vector<VisitInfo> visits2; const base::string16 title2(UTF8ToUTF16("example")); Time last_visited2 = Time::Now(); Time created2 = last_visited2 - TimeDelta::FromDays(10); - visits2.push_back(VisitInfo(created2, content::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(created2, ui::PAGE_TRANSITION_LINK)); visits2.push_back(VisitInfo(last_visited2 - TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); - visits2.push_back(VisitInfo(last_visited2, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(last_visited2, ui::PAGE_TRANSITION_LINK)); // Only use the HistoryBackend to generate the test data. // HistoryBackend will shutdown after that. @@ -1802,20 +1802,20 @@ TEST_F(AndroidProviderBackendTest, QueryWithoutThumbnailDB) { std::vector<VisitInfo> visits1; Time last_visited1 = Time::Now() - TimeDelta::FromDays(1); Time created1 = last_visited1 - TimeDelta::FromDays(20); - visits1.push_back(VisitInfo(created1, content::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(created1, ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo(last_visited1 - TimeDelta::FromDays(1), - content::PAGE_TRANSITION_LINK)); - visits1.push_back(VisitInfo(last_visited1, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits1.push_back(VisitInfo(last_visited1, ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); std::vector<VisitInfo> visits2; const base::string16 title2(UTF8ToUTF16("example")); Time last_visited2 = Time::Now(); Time created2 = last_visited2 - TimeDelta::FromDays(10); - visits2.push_back(VisitInfo(created2, content::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(created2, ui::PAGE_TRANSITION_LINK)); visits2.push_back(VisitInfo(last_visited2 - TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); - visits2.push_back(VisitInfo(last_visited2, content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(last_visited2, ui::PAGE_TRANSITION_LINK)); // Only use the HistoryBackend to generate the test data. // HistoryBackend will shutdown after that. diff --git a/chrome/browser/history/android/visit_sql_handler.cc b/chrome/browser/history/android/visit_sql_handler.cc index fe9c1e5..29be69f 100644 --- a/chrome/browser/history/android/visit_sql_handler.cc +++ b/chrome/browser/history/android/visit_sql_handler.cc @@ -113,10 +113,10 @@ bool VisitSQLHandler::Delete(const TableIDRows& ids_set) { } bool VisitSQLHandler::AddVisit(URLID url_id, const Time& visit_time) { - // TODO : Is 'content::PAGE_TRANSITION_AUTO_BOOKMARK' proper? - // if not, a new content::PageTransition type will need. + // TODO : Is 'ui::PAGE_TRANSITION_AUTO_BOOKMARK' proper? + // if not, a new ui::PageTransition type will need. VisitRow visit_row(url_id, visit_time, 0, - content::PAGE_TRANSITION_AUTO_BOOKMARK, 0); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, 0); return history_db_->AddVisit(&visit_row, SOURCE_BROWSED); } diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc index 58eace8..7c6de26 100644 --- a/chrome/browser/history/expire_history_backend.cc +++ b/chrome/browser/history/expire_history_backend.cc @@ -86,7 +86,7 @@ class AutoSubframeVisitsReader : public ExpiringVisitsReader { db->GetVisitsInRangeForTransition(begin_time, early_end_time, max_visits, - content::PAGE_TRANSITION_AUTO_SUBFRAME, + ui::PAGE_TRANSITION_AUTO_SUBFRAME, visits); bool more = static_cast<int>(visits->size()) == max_visits; if (!more) @@ -399,13 +399,13 @@ void ExpireHistoryBackend::ExpireURLsForVisits(const VisitVector& visits, // TODO(pkasting): http://b/1148304 We shouldn't be marking so many URLs as // typed, which would help eliminate the need for this code (we still would // need to handle RELOAD transitions specially, though). - content::PageTransition transition = - content::PageTransitionStripQualifier(visits[i].transition); - if (transition != content::PAGE_TRANSITION_RELOAD) + ui::PageTransition transition = + ui::PageTransitionStripQualifier(visits[i].transition); + if (transition != ui::PAGE_TRANSITION_RELOAD) cur.visit_count++; - if ((transition == content::PAGE_TRANSITION_TYPED && - !content::PageTransitionIsRedirect(visits[i].transition)) || - transition == content::PAGE_TRANSITION_KEYWORD_GENERATED) + if ((transition == ui::PAGE_TRANSITION_TYPED && + !ui::PageTransitionIsRedirect(visits[i].transition)) || + transition == ui::PAGE_TRANSITION_KEYWORD_GENERATED) cur.typed_count++; } diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc index 3253369..9542dbc 100644 --- a/chrome/browser/history/expire_history_backend_unittest.cc +++ b/chrome/browser/history/expire_history_backend_unittest.cc @@ -236,7 +236,7 @@ void ExpireHistoryTest::AddExampleData(URLID url_ids[3], Time visit_times[4]) { VisitRow visit_row3; visit_row3.url_id = url_ids[1]; visit_row3.visit_time = visit_times[2]; - visit_row3.transition = content::PAGE_TRANSITION_TYPED; + visit_row3.transition = ui::PAGE_TRANSITION_TYPED; main_db_->AddVisit(&visit_row3, SOURCE_BROWSED); VisitRow visit_row4; @@ -259,19 +259,19 @@ void ExpireHistoryTest::AddExampleSourceData(const GURL& url, URLID* id) { // Four times for each visit. VisitRow visit_row1(url_id, last_visit_time - TimeDelta::FromDays(4), 0, - content::PAGE_TRANSITION_TYPED, 0); + ui::PAGE_TRANSITION_TYPED, 0); main_db_->AddVisit(&visit_row1, SOURCE_SYNCED); VisitRow visit_row2(url_id, last_visit_time - TimeDelta::FromDays(3), 0, - content::PAGE_TRANSITION_TYPED, 0); + ui::PAGE_TRANSITION_TYPED, 0); main_db_->AddVisit(&visit_row2, SOURCE_BROWSED); VisitRow visit_row3(url_id, last_visit_time - TimeDelta::FromDays(2), 0, - content::PAGE_TRANSITION_TYPED, 0); + ui::PAGE_TRANSITION_TYPED, 0); main_db_->AddVisit(&visit_row3, SOURCE_EXTENSION); VisitRow visit_row4( - url_id, last_visit_time, 0, content::PAGE_TRANSITION_TYPED, 0); + url_id, last_visit_time, 0, ui::PAGE_TRANSITION_TYPED, 0); main_db_->AddVisit(&visit_row4, SOURCE_FIREFOX_IMPORTED); } diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 1ab3a55..7c7dcf2 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -322,18 +322,18 @@ SegmentID HistoryBackend::UpdateSegments( const GURL& url, VisitID from_visit, VisitID visit_id, - content::PageTransition transition_type, + ui::PageTransition transition_type, const Time ts) { if (!db_) return 0; // We only consider main frames. - if (!content::PageTransitionIsMainFrame(transition_type)) + if (!ui::PageTransitionIsMainFrame(transition_type)) return 0; SegmentID segment_id = 0; - content::PageTransition t = - content::PageTransitionStripQualifier(transition_type); + ui::PageTransition t = + ui::PageTransitionStripQualifier(transition_type); // Are we at the beginning of a new segment? // Note that navigating to an existing entry (with back/forward) reuses the @@ -348,9 +348,9 @@ SegmentID HistoryBackend::UpdateSegments( // Note also that we should still be updating the visit count for that segment // which we are not doing now. It should be addressed when // http://crbug.com/96860 is fixed. - if ((t == content::PAGE_TRANSITION_TYPED || - t == content::PAGE_TRANSITION_AUTO_BOOKMARK) && - (transition_type & content::PAGE_TRANSITION_FORWARD_BACK) == 0) { + if ((t == ui::PAGE_TRANSITION_TYPED || + t == ui::PAGE_TRANSITION_AUTO_BOOKMARK) && + (transition_type & ui::PAGE_TRANSITION_FORWARD_BACK) == 0) { // If so, create or get the segment. std::string segment_name = db_->ComputeSegmentName(url); URLID url_id = db_->GetRowForURL(url, NULL); @@ -437,18 +437,18 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { if (request.time < first_recorded_time_) first_recorded_time_ = request.time; - content::PageTransition request_transition = request.transition; - content::PageTransition stripped_transition = - content::PageTransitionStripQualifier(request_transition); + ui::PageTransition request_transition = request.transition; + ui::PageTransition stripped_transition = + ui::PageTransitionStripQualifier(request_transition); bool is_keyword_generated = - (stripped_transition == content::PAGE_TRANSITION_KEYWORD_GENERATED); + (stripped_transition == ui::PAGE_TRANSITION_KEYWORD_GENERATED); // If the user is navigating to a not-previously-typed intranet hostname, // change the transition to TYPED so that the omnibox will learn that this is // a known host. bool has_redirects = request.redirects.size() > 1; - if (content::PageTransitionIsMainFrame(request_transition) && - (stripped_transition != content::PAGE_TRANSITION_TYPED) && + if (ui::PageTransitionIsMainFrame(request_transition) && + (stripped_transition != ui::PAGE_TRANSITION_TYPED) && !is_keyword_generated) { const GURL& origin_url(has_redirects ? request.redirects[0] : request.url); @@ -462,21 +462,21 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); if (registry_length == 0 && !db_->IsTypedHost(host)) { - stripped_transition = content::PAGE_TRANSITION_TYPED; + stripped_transition = ui::PAGE_TRANSITION_TYPED; request_transition = - content::PageTransitionFromInt( + ui::PageTransitionFromInt( stripped_transition | - content::PageTransitionGetQualifier(request_transition)); + ui::PageTransitionGetQualifier(request_transition)); } } } if (!has_redirects) { // The single entry is both a chain start and end. - content::PageTransition t = content::PageTransitionFromInt( + ui::PageTransition t = ui::PageTransitionFromInt( request_transition | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END); + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END); // No redirect case (one element means just the page itself). last_ids = AddPageVisit(request.url, request.time, @@ -495,8 +495,8 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { } else { // Redirect case. Add the redirect chain. - content::PageTransition redirect_info = - content::PAGE_TRANSITION_CHAIN_START; + ui::PageTransition redirect_info = + ui::PAGE_TRANSITION_CHAIN_START; RedirectList redirects = request.redirects; if (redirects[0].SchemeIs(url::kAboutScheme)) { @@ -510,8 +510,8 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { // In this case, we just don't bother hooking up the source of the // redirects, so we remove it. redirects.erase(redirects.begin()); - } else if (request_transition & content::PAGE_TRANSITION_CLIENT_REDIRECT) { - redirect_info = content::PAGE_TRANSITION_CLIENT_REDIRECT; + } else if (request_transition & ui::PAGE_TRANSITION_CLIENT_REDIRECT) { + redirect_info = ui::PAGE_TRANSITION_CLIENT_REDIRECT; // The first entry in the redirect chain initiated a client redirect. // We don't add this to the database since the referrer is already // there, so we skip over it but change the transition type of the first @@ -532,9 +532,9 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { VisitRow visit_row; if (request.did_replace_entry && db_->GetRowForVisit(last_ids.second, &visit_row) && - visit_row.transition & content::PAGE_TRANSITION_CHAIN_END) { - visit_row.transition = content::PageTransitionFromInt( - visit_row.transition & ~content::PAGE_TRANSITION_CHAIN_END); + visit_row.transition & ui::PAGE_TRANSITION_CHAIN_END) { + visit_row.transition = ui::PageTransitionFromInt( + visit_row.transition & ~ui::PAGE_TRANSITION_CHAIN_END); db_->UpdateVisitRow(visit_row); } } @@ -542,13 +542,13 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { for (size_t redirect_index = 0; redirect_index < redirects.size(); redirect_index++) { - content::PageTransition t = - content::PageTransitionFromInt(stripped_transition | redirect_info); + ui::PageTransition t = + ui::PageTransitionFromInt(stripped_transition | redirect_info); // If this is the last transition, add a CHAIN_END marker if (redirect_index == (redirects.size() - 1)) { - t = content::PageTransitionFromInt( - t | content::PAGE_TRANSITION_CHAIN_END); + t = ui::PageTransitionFromInt( + t | ui::PAGE_TRANSITION_CHAIN_END); } // Record all redirect visits with the same timestamp. We don't display @@ -557,7 +557,7 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { last_ids = AddPageVisit(redirects[redirect_index], request.time, last_ids.second, t, request.visit_source); - if (t & content::PAGE_TRANSITION_CHAIN_START) { + if (t & ui::PAGE_TRANSITION_CHAIN_START) { // Update the segment for this visit. UpdateSegments(redirects[redirect_index], from_visit_id, last_ids.second, t, request.time); @@ -568,7 +568,7 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { // Subsequent transitions in the redirect list must all be server // redirects. - redirect_info = content::PAGE_TRANSITION_SERVER_REDIRECT; + redirect_info = ui::PAGE_TRANSITION_SERVER_REDIRECT; } // Last, save this redirect chain for later so we can set titles & favicons @@ -583,8 +583,8 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { // TODO(evanm): Due to http://b/1194536 we lose the referrers of a subframe // navigation anyway, so last_visit_id is always zero for them. But adding // them here confuses main frame history, so we skip them for now. - if (stripped_transition != content::PAGE_TRANSITION_AUTO_SUBFRAME && - stripped_transition != content::PAGE_TRANSITION_MANUAL_SUBFRAME && + if (stripped_transition != ui::PAGE_TRANSITION_AUTO_SUBFRAME && + stripped_transition != ui::PAGE_TRANSITION_MANUAL_SUBFRAME && !is_keyword_generated) { tracker_.AddVisit(request.context_id, request.page_id, request.url, last_ids.second); @@ -734,28 +734,28 @@ std::pair<URLID, VisitID> HistoryBackend::AddPageVisit( const GURL& url, Time time, VisitID referring_visit, - content::PageTransition transition, + ui::PageTransition transition, VisitSource visit_source) { // Top-level frame navigations are visible, everything else is hidden - bool new_hidden = !content::PageTransitionIsMainFrame(transition); + bool new_hidden = !ui::PageTransitionIsMainFrame(transition); // NOTE: This code must stay in sync with // ExpireHistoryBackend::ExpireURLsForVisits(). // TODO(pkasting): http://b/1148304 We shouldn't be marking so many URLs as // typed, which would eliminate the need for this code. int typed_increment = 0; - content::PageTransition transition_type = - content::PageTransitionStripQualifier(transition); - if ((transition_type == content::PAGE_TRANSITION_TYPED && - !content::PageTransitionIsRedirect(transition)) || - transition_type == content::PAGE_TRANSITION_KEYWORD_GENERATED) + ui::PageTransition transition_type = + ui::PageTransitionStripQualifier(transition); + if ((transition_type == ui::PAGE_TRANSITION_TYPED && + !ui::PageTransitionIsRedirect(transition)) || + transition_type == ui::PAGE_TRANSITION_KEYWORD_GENERATED) typed_increment = 1; #if defined(OS_ANDROID) // Only count the page visit if it came from user browsing and only count it // once when cycling through a redirect chain. if (visit_source == SOURCE_BROWSED && - (transition & content::PAGE_TRANSITION_CHAIN_END) != 0) { + (transition & ui::PAGE_TRANSITION_CHAIN_END) != 0) { RecordTopPageVisitStats(url); } #endif @@ -765,8 +765,8 @@ std::pair<URLID, VisitID> HistoryBackend::AddPageVisit( URLID url_id = db_->GetRowForURL(url, &url_info); if (url_id) { // Update of an existing row. - if (content::PageTransitionStripQualifier(transition) != - content::PAGE_TRANSITION_RELOAD) + if (ui::PageTransitionStripQualifier(transition) != + ui::PAGE_TRANSITION_RELOAD) url_info.set_visit_count(url_info.visit_count() + 1); if (typed_increment) url_info.set_typed_count(url_info.typed_count() + typed_increment); @@ -854,10 +854,10 @@ void HistoryBackend::AddPagesWithDetails(const URLRows& urls, if (visit_source != SOURCE_SYNCED) { // Make up a visit to correspond to the last visit to the page. VisitRow visit_info(url_id, i->last_visit(), 0, - content::PageTransitionFromInt( - content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END), 0); + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END), 0); if (!db_->AddVisit(&visit_info, visit_source)) { NOTREACHED() << "Adding visit failed."; return; @@ -1253,7 +1253,7 @@ void HistoryBackend::QueryHistoryBasic(const QueryOptions& options, // Set whether the visit was blocked for a managed user by looking at the // transition type. url_result.set_blocked_visit( - (visit.transition & content::PAGE_TRANSITION_BLOCKED) != 0); + (visit.transition & ui::PAGE_TRANSITION_BLOCKED) != 0); // We don't set any of the query-specific parts of the URLResult, since // snippets and stuff don't apply to basic querying. diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 21d864b..293595c 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -613,7 +613,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, std::pair<URLID, VisitID> AddPageVisit(const GURL& url, base::Time time, VisitID referring_visit, - content::PageTransition transition, + ui::PageTransition transition, VisitSource visit_source); // Returns a redirect chain in |redirects| for the VisitID @@ -672,7 +672,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, SegmentID UpdateSegments(const GURL& url, VisitID from_visit, VisitID visit_id, - content::PageTransition transition_type, + ui::PageTransition transition_type, const base::Time ts); // Favicons ------------------------------------------------------------------ diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc index 91091a7..15b6b70 100644 --- a/chrome/browser/history/history_backend_unittest.cc +++ b/chrome/browser/history/history_backend_unittest.cc @@ -232,14 +232,14 @@ class HistoryBackendTest : public HistoryBackendTestBase { protected: void AddRedirectChain(const char* sequence[], int page_id) { AddRedirectChainWithTransitionAndTime(sequence, page_id, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, Time::Now()); } void AddRedirectChainWithTransitionAndTime( const char* sequence[], int page_id, - content::PageTransition transition, + ui::PageTransition transition, base::Time time) { history::RedirectList redirects; for (int i = 0; sequence[i] != NULL; ++i) @@ -271,7 +271,7 @@ class HistoryBackendTest : public HistoryBackendTestBase { redirects.push_back(url2); HistoryAddPageArgs request( url2, time, dummy_context_id, 0, url1, - redirects, content::PAGE_TRANSITION_CLIENT_REDIRECT, + redirects, ui::PAGE_TRANSITION_CLIENT_REDIRECT, history::SOURCE_BROWSED, did_replace); backend_->AddPage(request); @@ -628,7 +628,7 @@ TEST_F(HistoryBackendTest, DeleteAllThenAddData) { GURL url("http://www.google.com/"); HistoryAddPageArgs request(url, visit_time, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_KEYWORD_GENERATED, + ui::PAGE_TRANSITION_KEYWORD_GENERATED, history::SOURCE_BROWSED, false); backend_->AddPage(request); @@ -771,7 +771,7 @@ TEST_F(HistoryBackendTest, KeywordGenerated) { Time visit_time = Time::Now() - base::TimeDelta::FromDays(1); HistoryAddPageArgs request(url, visit_time, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_KEYWORD_GENERATED, + ui::PAGE_TRANSITION_KEYWORD_GENERATED, history::SOURCE_BROWSED, false); backend_->AddPage(request); @@ -823,21 +823,21 @@ TEST_F(HistoryBackendTest, ClientRedirect) { GURL url_a("http://google.com/a"); AddClientRedirect(GURL(), url_a, false, base::Time(), &transition1, &transition2); - EXPECT_TRUE(transition2 & content::PAGE_TRANSITION_CHAIN_END); + EXPECT_TRUE(transition2 & ui::PAGE_TRANSITION_CHAIN_END); // User initiated redirect to page B. GURL url_b("http://google.com/b"); AddClientRedirect(url_a, url_b, false, base::Time(), &transition1, &transition2); - EXPECT_TRUE(transition1 & content::PAGE_TRANSITION_CHAIN_END); - EXPECT_TRUE(transition2 & content::PAGE_TRANSITION_CHAIN_END); + EXPECT_TRUE(transition1 & ui::PAGE_TRANSITION_CHAIN_END); + EXPECT_TRUE(transition2 & ui::PAGE_TRANSITION_CHAIN_END); // Non-user initiated redirect to page C. GURL url_c("http://google.com/c"); AddClientRedirect(url_b, url_c, true, base::Time(), &transition1, &transition2); - EXPECT_FALSE(transition1 & content::PAGE_TRANSITION_CHAIN_END); - EXPECT_TRUE(transition2 & content::PAGE_TRANSITION_CHAIN_END); + EXPECT_FALSE(transition1 & ui::PAGE_TRANSITION_CHAIN_END); + EXPECT_TRUE(transition2 & ui::PAGE_TRANSITION_CHAIN_END); } TEST_F(HistoryBackendTest, AddPagesWithDetails) { @@ -1106,8 +1106,8 @@ TEST_F(HistoryBackendTest, StripUsernamePasswordTest) { // Visit the url with username, password. backend_->AddPageVisit(url, base::Time::Now(), 0, - content::PageTransitionFromInt( - content::PageTransitionGetQualifier(content::PAGE_TRANSITION_TYPED)), + ui::PageTransitionFromInt( + ui::PageTransitionGetQualifier(ui::PAGE_TRANSITION_TYPED)), history::SOURCE_BROWSED); // Fetch the row information about stripped url from history db. @@ -1129,15 +1129,15 @@ TEST_F(HistoryBackendTest, AddPageVisitSource) { // Assume visiting the url from an externsion. backend_->AddPageVisit( - url, base::Time::Now(), 0, content::PAGE_TRANSITION_TYPED, + url, base::Time::Now(), 0, ui::PAGE_TRANSITION_TYPED, history::SOURCE_EXTENSION); // Assume the url is imported from Firefox. backend_->AddPageVisit(url, base::Time::Now(), 0, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_FIREFOX_IMPORTED); // Assume this url is also synced. backend_->AddPageVisit(url, base::Time::Now(), 0, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_SYNCED); // Fetch the row information about the url from history db. @@ -1183,15 +1183,15 @@ TEST_F(HistoryBackendTest, AddPageVisitNotLastVisit) { // Visit the url with recent time. backend_->AddPageVisit(url, recent_time, 0, - content::PageTransitionFromInt( - content::PageTransitionGetQualifier(content::PAGE_TRANSITION_TYPED)), + ui::PageTransitionFromInt( + ui::PageTransitionGetQualifier(ui::PAGE_TRANSITION_TYPED)), history::SOURCE_BROWSED); // Add to the url a visit with older time (could be syncing from another // client, etc.). backend_->AddPageVisit(url, older_time, 0, - content::PageTransitionFromInt( - content::PageTransitionGetQualifier(content::PAGE_TRANSITION_TYPED)), + ui::PageTransitionFromInt( + ui::PageTransitionGetQualifier(ui::PAGE_TRANSITION_TYPED)), history::SOURCE_SYNCED); // Fetch the row information about url from history db. @@ -1218,11 +1218,11 @@ TEST_F(HistoryBackendTest, AddPageVisitFiresNotificationWithCorrectDetails) { // Visit two distinct URLs, the second one twice. backend_->AddPageVisit(url1, base::Time::Now(), 0, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED); for (int i = 0; i < 2; ++i) { backend_->AddPageVisit(url2, base::Time::Now(), 0, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED); } @@ -1237,8 +1237,8 @@ TEST_F(HistoryBackendTest, AddPageVisitFiresNotificationWithCorrectDetails) { broadcasted_notifications()[0].first); const URLVisitedDetails* details = static_cast<const URLVisitedDetails*>( broadcasted_notifications()[0].second); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - content::PageTransitionStripQualifier(details->transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionStripQualifier(details->transition)); EXPECT_EQ(stored_row1.id(), details->row.id()); EXPECT_EQ(stored_row1.url(), details->row.url()); @@ -1250,8 +1250,8 @@ TEST_F(HistoryBackendTest, AddPageVisitFiresNotificationWithCorrectDetails) { broadcasted_notifications()[2].first); details = static_cast<const URLVisitedDetails*>( broadcasted_notifications()[2].second); - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - content::PageTransitionStripQualifier(details->transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionStripQualifier(details->transition)); EXPECT_EQ(stored_row2.id(), details->row.id()); EXPECT_EQ(stored_row2.url(), details->row.url()); } @@ -1264,19 +1264,19 @@ TEST_F(HistoryBackendTest, AddPageArgsSource) { // Assume this page is browsed by user. HistoryAddPageArgs request1(url, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_KEYWORD_GENERATED, + ui::PAGE_TRANSITION_KEYWORD_GENERATED, history::SOURCE_BROWSED, false); backend_->AddPage(request1); // Assume this page is synced. HistoryAddPageArgs request2(url, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_SYNCED, false); backend_->AddPage(request2); // Assume this page is browsed again. HistoryAddPageArgs request3(url, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); backend_->AddPage(request3); @@ -1299,18 +1299,18 @@ TEST_F(HistoryBackendTest, AddVisitsSource) { std::vector<VisitInfo> visits1, visits2; visits1.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(1), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo( - Time::Now(), content::PAGE_TRANSITION_LINK)); + Time::Now(), ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); visits2.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(10), - content::PAGE_TRANSITION_LINK)); - visits2.push_back(VisitInfo(Time::Now(), content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(Time::Now(), ui::PAGE_TRANSITION_LINK)); // Clear all history. backend_->DeleteAllHistory(); @@ -1346,12 +1346,12 @@ TEST_F(HistoryBackendTest, GetMostRecentVisits) { std::vector<VisitInfo> visits1; visits1.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(1), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo( - Time::Now(), content::PAGE_TRANSITION_LINK)); + Time::Now(), ui::PAGE_TRANSITION_LINK)); // Clear all history. backend_->DeleteAllHistory(); @@ -1377,13 +1377,13 @@ TEST_F(HistoryBackendTest, RemoveVisitsTransitions) { GURL url1("http://www.cnn.com"); VisitInfo typed_visit( Time::Now() - base::TimeDelta::FromDays(6), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); VisitInfo reload_visit( Time::Now() - base::TimeDelta::FromDays(5), - content::PAGE_TRANSITION_RELOAD); + ui::PAGE_TRANSITION_RELOAD); VisitInfo link_visit( Time::Now() - base::TimeDelta::FromDays(4), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); std::vector<VisitInfo> visits_to_add; visits_to_add.push_back(typed_visit); visits_to_add.push_back(reload_visit); @@ -1430,15 +1430,15 @@ TEST_F(HistoryBackendTest, RemoveVisitsSource) { std::vector<VisitInfo> visits1, visits2; visits1.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(5), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); visits1.push_back(VisitInfo(Time::Now(), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); visits2.push_back(VisitInfo( Time::Now() - base::TimeDelta::FromDays(10), - content::PAGE_TRANSITION_LINK)); - visits2.push_back(VisitInfo(Time::Now(), content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); + visits2.push_back(VisitInfo(Time::Now(), ui::PAGE_TRANSITION_LINK)); // Clear all history. backend_->DeleteAllHistory(); @@ -2543,10 +2543,10 @@ TEST_F(HistoryBackendTest, QueryFilteredURLs) { base::TimeDelta one_hour = base::TimeDelta::FromHours(1); base::TimeDelta one_day = base::TimeDelta::FromDays(1); - const content::PageTransition kTypedTransition = - content::PAGE_TRANSITION_TYPED; - const content::PageTransition kKeywordGeneratedTransition = - content::PAGE_TRANSITION_KEYWORD_GENERATED; + const ui::PageTransition kTypedTransition = + ui::PAGE_TRANSITION_TYPED; + const ui::PageTransition kKeywordGeneratedTransition = + ui::PAGE_TRANSITION_KEYWORD_GENERATED; const char* redirect_sequence[2]; redirect_sequence[1] = NULL; @@ -2682,11 +2682,11 @@ TEST_F(HistoryBackendTest, UpdateVisitDuration) { std::vector<VisitInfo> visit_info1, visit_info2; Time start_ts = Time::Now() - base::TimeDelta::FromDays(5); Time end_ts = start_ts + base::TimeDelta::FromDays(2); - visit_info1.push_back(VisitInfo(start_ts, content::PAGE_TRANSITION_LINK)); + visit_info1.push_back(VisitInfo(start_ts, ui::PAGE_TRANSITION_LINK)); GURL url2("http://www.example.com"); visit_info2.push_back(VisitInfo(Time::Now() - base::TimeDelta::FromDays(10), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); // Clear all history. backend_->DeleteAllHistory(); @@ -2972,7 +2972,7 @@ TEST_F(HistoryBackendTest, RemoveNotification) { service->AddPage( url, base::Time::Now(), NULL, 1, GURL(), RedirectList(), - content::PAGE_TRANSITION_TYPED, SOURCE_BROWSED, false); + ui::PAGE_TRANSITION_TYPED, SOURCE_BROWSED, false); // This won't actually delete the URL, rather it'll empty out the visits. // This triggers blocking on the BookmarkModel. diff --git a/chrome/browser/history/history_notifications.cc b/chrome/browser/history/history_notifications.cc index 86c859f..2f30a3b 100644 --- a/chrome/browser/history/history_notifications.cc +++ b/chrome/browser/history/history_notifications.cc @@ -7,7 +7,7 @@ namespace history { URLVisitedDetails::URLVisitedDetails() - : transition(content::PAGE_TRANSITION_LINK) {} + : transition(ui::PAGE_TRANSITION_LINK) {} URLVisitedDetails::~URLVisitedDetails() {} diff --git a/chrome/browser/history/history_notifications.h b/chrome/browser/history/history_notifications.h index 2eb4fa7..3386b2f 100644 --- a/chrome/browser/history/history_notifications.h +++ b/chrome/browser/history/history_notifications.h @@ -21,7 +21,7 @@ struct URLVisitedDetails : public HistoryDetails { URLVisitedDetails(); virtual ~URLVisitedDetails(); - content::PageTransition transition; + ui::PageTransition transition; // The affected URLRow. The ID will be set to the value that is currently in // effect in the main history database. diff --git a/chrome/browser/history/history_querying_unittest.cc b/chrome/browser/history/history_querying_unittest.cc index d5b1c04..b7a9b25 100644 --- a/chrome/browser/history/history_querying_unittest.cc +++ b/chrome/browser/history/history_querying_unittest.cc @@ -154,7 +154,7 @@ class HistoryQueryTest : public testing::Test { GURL url(entry.url); history_->AddPage(url, entry.time, context_id, page_id_++, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); history_->SetPageTitle(url, base::UTF8ToUTF16(entry.title)); } diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc index fd4c2d9..4c61734 100644 --- a/chrome/browser/history/history_service.cc +++ b/chrome/browser/history/history_service.cc @@ -370,7 +370,7 @@ void HistoryService::AddPage(const GURL& url, int32 page_id, const GURL& referrer, const history::RedirectList& redirects, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource visit_source, bool did_replace_entry) { DCHECK(thread_checker_.CalledOnValidThread()); @@ -387,7 +387,7 @@ void HistoryService::AddPage(const GURL& url, AddPage( history::HistoryAddPageArgs(url, time, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, visit_source, false)); } diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h index 9be45da..a7de0cb 100644 --- a/chrome/browser/history/history_service.h +++ b/chrome/browser/history/history_service.h @@ -33,9 +33,9 @@ #include "content/public/browser/download_manager_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -#include "content/public/common/page_transition_types.h" #include "sql/init_status.h" #include "sync/api/syncable_service.h" +#include "ui/base/page_transition_types.h" #if defined(OS_ANDROID) class AndroidHistoryProviderService; @@ -182,7 +182,7 @@ class HistoryService : public content::NotificationObserver, int32 page_id, const GURL& referrer, const history::RedirectList& redirects, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource visit_source, bool did_replace_entry); diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc index 370594e..f0f7960 100644 --- a/chrome/browser/history/history_tab_helper.cc +++ b/chrome/browser/history/history_tab_helper.cc @@ -61,7 +61,7 @@ HistoryTabHelper::CreateHistoryAddPageArgs( params.url, timestamp, web_contents(), params.page_id, params.referrer.url, params.redirects, params.transition, history::SOURCE_BROWSED, did_replace_entry); - if (content::PageTransitionIsMainFrame(params.transition) && + if (ui::PageTransitionIsMainFrame(params.transition) && virtual_url != params.url) { // Hack on the "virtual" URL so that it will appear in history. For some // types of URLs, we will display a magic URL that is different from where diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc index 97145ec..5e733cc 100644 --- a/chrome/browser/history/history_types.cc +++ b/chrome/browser/history/history_types.cc @@ -17,14 +17,14 @@ VisitRow::VisitRow() : visit_id(0), url_id(0), referring_visit(0), - transition(content::PAGE_TRANSITION_LINK), + transition(ui::PAGE_TRANSITION_LINK), segment_id(0) { } VisitRow::VisitRow(URLID arg_url_id, base::Time arg_visit_time, VisitID arg_referring_visit, - content::PageTransition arg_transition, + ui::PageTransition arg_transition, SegmentID arg_segment_id) : visit_id(0), url_id(arg_url_id), @@ -50,7 +50,7 @@ QueryURLResult::~QueryURLResult() { HistoryAddPageArgs::HistoryAddPageArgs() : context_id(NULL), page_id(0), - transition(content::PAGE_TRANSITION_LINK), + transition(ui::PAGE_TRANSITION_LINK), visit_source(SOURCE_BROWSED), did_replace_entry(false) {} @@ -61,7 +61,7 @@ HistoryAddPageArgs::HistoryAddPageArgs( int32 page_id, const GURL& referrer, const history::RedirectList& redirects, - content::PageTransition transition, + ui::PageTransition transition, VisitSource source, bool did_replace_entry) : url(url), diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h index 70946bf..c50856b 100644 --- a/chrome/browser/history/history_types.h +++ b/chrome/browser/history/history_types.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ #include "components/history/core/browser/history_types.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" namespace content { class WebContents; @@ -30,7 +30,7 @@ class VisitRow { VisitRow(URLID arg_url_id, base::Time arg_visit_time, VisitID arg_referring_visit, - content::PageTransition arg_transition, + ui::PageTransition arg_transition, SegmentID arg_segment_id); ~VisitRow(); @@ -47,7 +47,7 @@ class VisitRow { VisitID referring_visit; // A combination of bits from PageTransition. - content::PageTransition transition; + ui::PageTransition transition; // The segment id (see visitsegment_database.*). // If 0, the segment id is null in the table. @@ -72,7 +72,7 @@ typedef std::vector<VisitRow> VisitVector; // The basic information associated with a visit (timestamp, type of visit), // used by HistoryBackend::AddVisits() to create new visits for a URL. -typedef std::pair<base::Time, content::PageTransition> VisitInfo; +typedef std::pair<base::Time, ui::PageTransition> VisitInfo; // QueryURLResult ------------------------------------------------------------- @@ -96,7 +96,7 @@ struct HistoryAddPageArgs { // // HistoryAddPageArgs( // GURL(), base::Time(), NULL, 0, GURL(), - // history::RedirectList(), content::PAGE_TRANSITION_LINK, + // history::RedirectList(), ui::PAGE_TRANSITION_LINK, // SOURCE_BROWSED, false) HistoryAddPageArgs(); HistoryAddPageArgs(const GURL& url, @@ -105,7 +105,7 @@ struct HistoryAddPageArgs { int32 page_id, const GURL& referrer, const history::RedirectList& redirects, - content::PageTransition transition, + ui::PageTransition transition, VisitSource source, bool did_replace_entry); ~HistoryAddPageArgs(); @@ -118,7 +118,7 @@ struct HistoryAddPageArgs { GURL referrer; history::RedirectList redirects; - content::PageTransition transition; + ui::PageTransition transition; VisitSource visit_source; bool did_replace_entry; }; @@ -127,7 +127,7 @@ struct HistoryAddPageArgs { struct BriefVisitInfo { URLID url_id; base::Time time; - content::PageTransition transition; + ui::PageTransition transition; }; // An observer of VisitDatabase. diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc index 13b6aa1..a4fdf6b 100644 --- a/chrome/browser/history/history_unittest.cc +++ b/chrome/browser/history/history_unittest.cc @@ -1119,7 +1119,7 @@ TEST_F(HistoryTest, AddPage) { const GURL test_url("http://www.google.com/"); history_service_->AddPage(test_url, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_MANUAL_SUBFRAME, + ui::PAGE_TRANSITION_MANUAL_SUBFRAME, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); EXPECT_EQ(1, query_url_row_.visit_count()); @@ -1128,7 +1128,7 @@ TEST_F(HistoryTest, AddPage) { // Add the page once from the main frame (should unhide it). history_service_->AddPage(test_url, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); EXPECT_EQ(2, query_url_row_.visit_count()); // Added twice. @@ -1151,7 +1151,7 @@ TEST_F(HistoryTest, AddRedirect) { history_service_->AddPage( first_redirects.back(), base::Time::Now(), reinterpret_cast<ContextID>(1), 0, GURL(), first_redirects, - content::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, true); + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, true); // The first page should be added once with a link visit type (because we set // LINK when we added the original URL, and a referrer of nowhere (0). @@ -1159,8 +1159,8 @@ TEST_F(HistoryTest, AddRedirect) { EXPECT_EQ(1, query_url_row_.visit_count()); ASSERT_EQ(1U, query_url_visits_.size()); int64 first_visit = query_url_visits_[0].visit_id; - EXPECT_EQ(content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CHAIN_START, + EXPECT_EQ(ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CHAIN_START, query_url_visits_[0].transition); EXPECT_EQ(0, query_url_visits_[0].referring_visit); // No referrer. @@ -1170,8 +1170,8 @@ TEST_F(HistoryTest, AddRedirect) { EXPECT_EQ(1, query_url_row_.visit_count()); ASSERT_EQ(1U, query_url_visits_.size()); int64 second_visit = query_url_visits_[0].visit_id; - EXPECT_EQ(content::PAGE_TRANSITION_SERVER_REDIRECT | - content::PAGE_TRANSITION_CHAIN_END, + EXPECT_EQ(ui::PAGE_TRANSITION_SERVER_REDIRECT | + ui::PAGE_TRANSITION_CHAIN_END, query_url_visits_[0].transition); EXPECT_EQ(first_visit, query_url_visits_[0].referring_visit); @@ -1190,9 +1190,9 @@ TEST_F(HistoryTest, AddRedirect) { history_service_->AddPage(second_redirects[1], base::Time::Now(), reinterpret_cast<ContextID>(1), 1, second_redirects[0], second_redirects, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CLIENT_REDIRECT), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CLIENT_REDIRECT), history::SOURCE_BROWSED, true); // The last page (source of the client redirect) should NOT have an @@ -1205,8 +1205,8 @@ TEST_F(HistoryTest, AddRedirect) { EXPECT_TRUE(QueryURL(history_service_.get(), second_redirects[1])); EXPECT_EQ(1, query_url_row_.visit_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_CLIENT_REDIRECT | - content::PAGE_TRANSITION_CHAIN_END, + EXPECT_EQ(ui::PAGE_TRANSITION_CLIENT_REDIRECT | + ui::PAGE_TRANSITION_CHAIN_END, query_url_visits_[0].transition); EXPECT_EQ(second_visit, query_url_visits_[0].referring_visit); } @@ -1219,14 +1219,14 @@ TEST_F(HistoryTest, MakeIntranetURLsTyped) { const GURL test_url("http://intranet_host/path"); history_service_->AddPage( test_url, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); EXPECT_EQ(1, query_url_row_.visit_count()); EXPECT_EQ(1, query_url_row_.typed_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - content::PageTransitionStripQualifier(query_url_visits_[0].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionStripQualifier(query_url_visits_[0].transition)); // Add more visits on the same host. None of these should be promoted since // there is already a typed visit. @@ -1235,66 +1235,66 @@ TEST_F(HistoryTest, MakeIntranetURLsTyped) { const GURL test_url2("http://intranet_host/different_path"); history_service_->AddPage( test_url2, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url2)); EXPECT_EQ(1, query_url_row_.visit_count()); EXPECT_EQ(0, query_url_row_.typed_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - content::PageTransitionStripQualifier(query_url_visits_[0].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionStripQualifier(query_url_visits_[0].transition)); // No path. const GURL test_url3("http://intranet_host/"); history_service_->AddPage( test_url3, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url3)); EXPECT_EQ(1, query_url_row_.visit_count()); EXPECT_EQ(0, query_url_row_.typed_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - content::PageTransitionStripQualifier(query_url_visits_[0].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionStripQualifier(query_url_visits_[0].transition)); // Different scheme. const GURL test_url4("https://intranet_host/"); history_service_->AddPage( test_url4, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url4)); EXPECT_EQ(1, query_url_row_.visit_count()); EXPECT_EQ(0, query_url_row_.typed_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - content::PageTransitionStripQualifier(query_url_visits_[0].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionStripQualifier(query_url_visits_[0].transition)); // Different transition. const GURL test_url5("http://intranet_host/another_path"); history_service_->AddPage( test_url5, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PAGE_TRANSITION_AUTO_BOOKMARK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url5)); EXPECT_EQ(1, query_url_row_.visit_count()); EXPECT_EQ(0, query_url_row_.typed_count()); ASSERT_EQ(1U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_AUTO_BOOKMARK, - content::PageTransitionStripQualifier(query_url_visits_[0].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PageTransitionStripQualifier(query_url_visits_[0].transition)); // Original URL. history_service_->AddPage( test_url, base::Time::Now(), NULL, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); EXPECT_EQ(2, query_url_row_.visit_count()); EXPECT_EQ(1, query_url_row_.typed_count()); ASSERT_EQ(2U, query_url_visits_.size()); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - content::PageTransitionStripQualifier(query_url_visits_[1].transition)); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionStripQualifier(query_url_visits_[1].transition)); } TEST_F(HistoryTest, Typed) { @@ -1306,7 +1306,7 @@ TEST_F(HistoryTest, Typed) { const GURL test_url("http://www.google.com/"); history_service_->AddPage( test_url, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); @@ -1317,7 +1317,7 @@ TEST_F(HistoryTest, Typed) { // Add the page again not typed. history_service_->AddPage( test_url, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); @@ -1328,7 +1328,7 @@ TEST_F(HistoryTest, Typed) { // Add the page again as a generated URL. history_service_->AddPage( test_url, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_GENERATED, + history::RedirectList(), ui::PAGE_TRANSITION_GENERATED, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); @@ -1339,7 +1339,7 @@ TEST_F(HistoryTest, Typed) { // Add the page again as a reload. history_service_->AddPage( test_url, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_RELOAD, + history::RedirectList(), ui::PAGE_TRANSITION_RELOAD, history::SOURCE_BROWSED, false); EXPECT_TRUE(QueryURL(history_service_.get(), test_url)); @@ -1391,11 +1391,11 @@ TEST_F(HistoryTest, MostVisitedURLs) { // Add two pages. history_service_->AddPage( url0, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->AddPage( url1, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->QueryMostVisitedURLs( 20, @@ -1412,7 +1412,7 @@ TEST_F(HistoryTest, MostVisitedURLs) { // Add another page. history_service_->AddPage( url2, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->QueryMostVisitedURLs( 20, @@ -1430,7 +1430,7 @@ TEST_F(HistoryTest, MostVisitedURLs) { // Revisit url2, making it the top URL. history_service_->AddPage( url2, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->QueryMostVisitedURLs( 20, @@ -1448,7 +1448,7 @@ TEST_F(HistoryTest, MostVisitedURLs) { // Revisit url1, making it the top URL. history_service_->AddPage( url1, base::Time::Now(), context_id, 0, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_TYPED, + history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->QueryMostVisitedURLs( 20, @@ -1471,7 +1471,7 @@ TEST_F(HistoryTest, MostVisitedURLs) { // Visit url4 using redirects. history_service_->AddPage( url4, base::Time::Now(), context_id, 0, GURL(), - redirects, content::PAGE_TRANSITION_TYPED, + redirects, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service_->QueryMostVisitedURLs( 20, @@ -1576,7 +1576,7 @@ TEST_F(HistoryTest, ProcessLocalDeleteDirectiveSyncOnline) { base::Time::UnixEpoch() + base::TimeDelta::FromMicroseconds(i); history_service_->AddPage(test_url, t, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); } @@ -1641,7 +1641,7 @@ TEST_F(HistoryTest, ProcessGlobalIdDeleteDirective) { base::Time::UnixEpoch() + base::TimeDelta::FromMicroseconds(i); history_service_->AddPage(test_url, t, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); } @@ -1732,7 +1732,7 @@ TEST_F(HistoryTest, ProcessTimeRangeDeleteDirective) { base::Time::UnixEpoch() + base::TimeDelta::FromMicroseconds(i); history_service_->AddPage(test_url, t, NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); } diff --git a/chrome/browser/history/in_memory_url_index_cache.proto b/chrome/browser/history/in_memory_url_index_cache.proto index 3a39e74..df2de1b 100644 --- a/chrome/browser/history/in_memory_url_index_cache.proto +++ b/chrome/browser/history/in_memory_url_index_cache.proto @@ -57,7 +57,7 @@ message InMemoryURLIndexCacheItem { message HistoryInfoMapEntry { message VisitInfo { required int64 visit_time = 1; - // Corresponds to content::PageTransition. + // Corresponds to ui::PageTransition. required uint64 transition_type = 2; } required int64 history_id = 1; diff --git a/chrome/browser/history/scored_history_match.cc b/chrome/browser/history/scored_history_match.cc index a5270f4..1f1184c 100644 --- a/chrome/browser/history/scored_history_match.cc +++ b/chrome/browser/history/scored_history_match.cc @@ -531,7 +531,7 @@ float ScoredHistoryMatch::GetFrequency(const base::Time& now, float summed_visit_points = 0; for (size_t i = 0; i < std::min(visits.size(), kMaxVisitsToScore); ++i) { int value_of_transition = - (visits[i].second == content::PAGE_TRANSITION_TYPED) ? 20 : 1; + (visits[i].second == ui::PAGE_TRANSITION_TYPED) ? 20 : 1; if (bookmarked) value_of_transition = std::max(value_of_transition, bookmark_value_); const float bucket_weight = diff --git a/chrome/browser/history/scored_history_match_unittest.cc b/chrome/browser/history/scored_history_match_unittest.cc index b653a9b..4989966 100644 --- a/chrome/browser/history/scored_history_match_unittest.cc +++ b/chrome/browser/history/scored_history_match_unittest.cc @@ -25,7 +25,7 @@ VisitInfoVector CreateVisitInfoVector(int num_visits, for (int i = 0; i < num_visits; ++i) { visits.push_back( std::make_pair(now - base::TimeDelta::FromDays(i * frequency), - content::PAGE_TRANSITION_LINK)); + ui::PAGE_TRANSITION_LINK)); } return visits; } @@ -122,7 +122,7 @@ TEST_F(ScoredHistoryMatchTest, Scoring) { WordStarts one_word_no_offset(1, 0u); VisitInfoVector visits_a = CreateVisitInfoVector(3, 30, now); // Mark one visit as typed. - visits_a[0].second = content::PAGE_TRANSITION_TYPED; + visits_a[0].second = ui::PAGE_TRANSITION_TYPED; ScoredHistoryMatch scored_a(row_a, visits_a, std::string(), ASCIIToUTF16("abc"), Make1Term("abc"), one_word_no_offset, word_starts_a, now, NULL); @@ -132,7 +132,7 @@ TEST_F(ScoredHistoryMatchTest, Scoring) { RowWordStarts word_starts_b; PopulateWordStarts(row_b, &word_starts_b); VisitInfoVector visits_b = CreateVisitInfoVector(10, 30, now); - visits_b[0].second = content::PAGE_TRANSITION_TYPED; + visits_b[0].second = ui::PAGE_TRANSITION_TYPED; ScoredHistoryMatch scored_b(row_b, visits_b, std::string(), ASCIIToUTF16("abc"), Make1Term("abc"), one_word_no_offset, word_starts_b, now, NULL); @@ -143,7 +143,7 @@ TEST_F(ScoredHistoryMatchTest, Scoring) { RowWordStarts word_starts_c; PopulateWordStarts(row_c, &word_starts_c); VisitInfoVector visits_c = CreateVisitInfoVector(3, 10, now); - visits_c[0].second = content::PAGE_TRANSITION_TYPED; + visits_c[0].second = ui::PAGE_TRANSITION_TYPED; ScoredHistoryMatch scored_c(row_c, visits_c, std::string(), ASCIIToUTF16("abc"), Make1Term("abc"), one_word_no_offset, word_starts_c, now, NULL); @@ -154,9 +154,9 @@ TEST_F(ScoredHistoryMatchTest, Scoring) { RowWordStarts word_starts_d; PopulateWordStarts(row_d, &word_starts_d); VisitInfoVector visits_d = CreateVisitInfoVector(3, 30, now); - visits_d[0].second = content::PAGE_TRANSITION_TYPED; - visits_d[1].second = content::PAGE_TRANSITION_TYPED; - visits_d[2].second = content::PAGE_TRANSITION_TYPED; + visits_d[0].second = ui::PAGE_TRANSITION_TYPED; + visits_d[1].second = ui::PAGE_TRANSITION_TYPED; + visits_d[2].second = ui::PAGE_TRANSITION_TYPED; ScoredHistoryMatch scored_d(row_d, visits_d, std::string(), ASCIIToUTF16("abc"), Make1Term("abc"), one_word_no_offset, word_starts_d, now, NULL); diff --git a/chrome/browser/history/shortcuts_database.cc b/chrome/browser/history/shortcuts_database.cc index 3094b58..ec4c097 100644 --- a/chrome/browser/history/shortcuts_database.cc +++ b/chrome/browser/history/shortcuts_database.cc @@ -11,10 +11,10 @@ #include "base/strings/stringprintf.h" #include "base/time/time.h" #include "components/omnibox/autocomplete_match_type.h" -#include "content/public/common/page_transition_types.h" #include "sql/meta_table.h" #include "sql/statement.h" #include "sql/transaction.h" +#include "ui/base/page_transition_types.h" // Helpers -------------------------------------------------------------------- @@ -243,7 +243,7 @@ bool ShortcutsDatabase::EnsureTable() { "ADD COLUMN transition INTEGER") && db_.Execute(base::StringPrintf( "UPDATE omni_box_shortcuts SET transition = %d", - static_cast<int>(content::PAGE_TRANSITION_TYPED)).c_str()) && + static_cast<int>(ui::PAGE_TRANSITION_TYPED)).c_str()) && db_.Execute("ALTER TABLE omni_box_shortcuts ADD COLUMN type INTEGER") && db_.Execute(base::StringPrintf( "UPDATE omni_box_shortcuts SET type = %d", diff --git a/chrome/browser/history/shortcuts_database_unittest.cc b/chrome/browser/history/shortcuts_database_unittest.cc index 7721f76..52324c3 100644 --- a/chrome/browser/history/shortcuts_database_unittest.cc +++ b/chrome/browser/history/shortcuts_database_unittest.cc @@ -13,11 +13,10 @@ #include "chrome/common/chrome_paths.h" #include "chrome/test/base/testing_profile.h" #include "components/omnibox/autocomplete_match_type.h" -#include "content/public/common/page_transition_types.h" #include "sql/statement.h" #include "sql/test/test_helpers.h" - #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" using base::ASCIIToUTF16; @@ -34,7 +33,7 @@ struct ShortcutsDatabaseTestInfo { std::string contents_class; std::string description; std::string description_class; - content::PageTransition transition; + ui::PageTransition transition; AutocompleteMatchType::Type type; std::string keyword; int days_from_now; @@ -42,17 +41,17 @@ struct ShortcutsDatabaseTestInfo { } shortcut_test_db[] = { { "BD85DBA2-8C29-49F9-84AE-48E1E90880DF", "goog", "www.google.com", "http://www.google.com/", "Google", "0,1,4,0", "Google", "0,1", - content::PAGE_TRANSITION_GENERATED, AutocompleteMatchType::SEARCH_HISTORY, + ui::PAGE_TRANSITION_GENERATED, AutocompleteMatchType::SEARCH_HISTORY, "google.com", 1, 100, }, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E0", "slash", "slashdot.org", "http://slashdot.org/", "slashdot.org", "0,1", "Slashdot - News for nerds, stuff that matters", "0,0", - content::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 0, + ui::PAGE_TRANSITION_TYPED, AutocompleteMatchType::HISTORY_URL, "", 0, 100}, { "BD85DBA2-8C29-49F9-84AE-48E1E90880E1", "news", "slashdot.org", "http://slashdot.org/", "slashdot.org", "0,1", "Slashdot - News for nerds, stuff that matters", "0,0", - content::PAGE_TRANSITION_LINK, AutocompleteMatchType::HISTORY_TITLE, "", 0, + ui::PAGE_TRANSITION_LINK, AutocompleteMatchType::HISTORY_TITLE, "", 0, 5}, }; @@ -258,8 +257,8 @@ TEST(ShortcutsDatabaseMigrationTest, MigrateTableAddFillIntoEdit) { EXPECT_EQ(statement.ColumnString(1), statement.ColumnString(0)); // The other three columns have default values. - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - static_cast<content::PageTransition>(statement.ColumnInt(2))); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionFromInt(statement.ColumnInt(2))); EXPECT_EQ(AutocompleteMatchType::HISTORY_TITLE, static_cast<AutocompleteMatchType::Type>(statement.ColumnInt(3))); EXPECT_TRUE(statement.ColumnString(4).empty()); diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc index 9cd07aa..168aa73 100644 --- a/chrome/browser/history/top_sites_impl_unittest.cc +++ b/chrome/browser/history/top_sites_impl_unittest.cc @@ -281,7 +281,7 @@ class TopSitesImplTest : public HistoryUnitTestBase { redirects.push_back(url); history_service()->AddPage( url, base::Time::Now(), reinterpret_cast<ContextID>(1), 0, GURL(), - redirects, content::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, + redirects, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); } @@ -291,7 +291,7 @@ class TopSitesImplTest : public HistoryUnitTestBase { redirects.push_back(url); history_service()->AddPage( url, base::Time::Now(), reinterpret_cast<ContextID>(1), 0, GURL(), - redirects, content::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, + redirects, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service()->SetPageTitle(url, title); } @@ -303,7 +303,7 @@ class TopSitesImplTest : public HistoryUnitTestBase { base::Time time) { history_service()->AddPage( url, time, reinterpret_cast<ContextID>(1), 0, GURL(), - redirects, content::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, + redirects, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service()->SetPageTitle(url, title); } diff --git a/chrome/browser/history/typed_url_syncable_service.cc b/chrome/browser/history/typed_url_syncable_service.cc index d3f8d54..57719f1 100644 --- a/chrome/browser/history/typed_url_syncable_service.cc +++ b/chrome/browser/history/typed_url_syncable_service.cc @@ -151,7 +151,7 @@ void TypedUrlSyncableService::OnUrlsModified(URLRows* changed_urls) { sync_processor_->ProcessSyncChanges(FROM_HERE, changes); } -void TypedUrlSyncableService::OnUrlVisited(content::PageTransition transition, +void TypedUrlSyncableService::OnUrlVisited(ui::PageTransition transition, URLRow* row) { DCHECK(expected_loop_ == base::MessageLoop::current()); DCHECK(row); @@ -245,13 +245,13 @@ bool TypedUrlSyncableService::ShouldIgnoreUrl(const GURL& url) { } bool TypedUrlSyncableService::ShouldSyncVisit( - content::PageTransition page_transition, + ui::PageTransition page_transition, URLRow* row) { if (!row) return false; int typed_count = row->typed_count(); - content::PageTransition transition = static_cast<content::PageTransition>( - page_transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = ui::PageTransitionFromInt( + page_transition & ui::PAGE_TRANSITION_CORE_MASK); // Just use an ad-hoc criteria to determine whether to ignore this // notification. For most users, the distribution of visits is roughly a bell @@ -260,7 +260,7 @@ bool TypedUrlSyncableService::ShouldSyncVisit( // suggestions. But there are relatively few URLs with > 10 visits, and those // tend to be more broadly distributed such that there's no need to sync up // every visit to preserve their relative ordering. - return (transition == content::PAGE_TRANSITION_TYPED && + return (transition == ui::PAGE_TRANSITION_TYPED && typed_count > 0 && (typed_count < kTypedUrlVisitThrottleThreshold || (typed_count % kTypedUrlVisitThrottleMultiple) == 0)); @@ -345,13 +345,13 @@ void TypedUrlSyncableService::WriteToTypedUrlSpecifics( // Walk the passed-in visit vector and count the # of typed visits. for (VisitVector::const_iterator visit = visits.begin(); visit != visits.end(); ++visit) { - content::PageTransition transition = content::PageTransitionFromInt( - visit->transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = ui::PageTransitionFromInt( + visit->transition & ui::PAGE_TRANSITION_CORE_MASK); // We ignore reload visits. - if (transition == content::PAGE_TRANSITION_RELOAD) + if (transition == ui::PAGE_TRANSITION_RELOAD) continue; ++total; - if (transition == content::PAGE_TRANSITION_TYPED) + if (transition == ui::PAGE_TRANSITION_TYPED) ++typed_count; } // We should have at least one typed visit. This can sometimes happen if @@ -370,20 +370,20 @@ void TypedUrlSyncableService::WriteToTypedUrlSpecifics( for (VisitVector::const_iterator visit = visits.begin(); visit != visits.end(); ++visit) { - content::PageTransition transition = content::PageTransitionFromInt( - visit->transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = + ui::PageTransitionStripQualifier(visit->transition); // Skip reload visits. - if (transition == content::PAGE_TRANSITION_RELOAD) + if (transition == ui::PAGE_TRANSITION_RELOAD) continue; // If we only have room for typed visits, then only add typed visits. - if (only_typed && transition != content::PAGE_TRANSITION_TYPED) + if (only_typed && transition != ui::PAGE_TRANSITION_TYPED) continue; if (skip_count > 0) { // We have too many entries to fit, so we need to skip the oldest ones. // Only skip typed URLs if there are too many typed URLs to fit. - if (only_typed || transition != content::PAGE_TRANSITION_TYPED) { + if (only_typed || transition != ui::PAGE_TRANSITION_TYPED) { --skip_count; continue; } @@ -400,7 +400,7 @@ void TypedUrlSyncableService::WriteToTypedUrlSpecifics( // it's not legal to have an empty visit array (yet another workaround // for http://crbug.com/84258). typed_url->add_visits(url.last_visit().ToInternalValue()); - typed_url->add_visit_transitions(content::PAGE_TRANSITION_RELOAD); + typed_url->add_visit_transitions(ui::PAGE_TRANSITION_RELOAD); } CHECK_GT(typed_url->visits_size(), 0); CHECK_LE(typed_url->visits_size(), kMaxTypedUrlVisits); @@ -426,7 +426,7 @@ bool TypedUrlSyncableService::FixupURLAndGetVisits( if (visits->empty()) { DVLOG(1) << "Found empty visits for URL: " << url->url(); VisitRow visit( - url->id(), url->last_visit(), 0, content::PAGE_TRANSITION_TYPED, 0); + url->id(), url->last_visit(), 0, ui::PAGE_TRANSITION_TYPED, 0); visits->push_back(visit); } diff --git a/chrome/browser/history/typed_url_syncable_service.h b/chrome/browser/history/typed_url_syncable_service.h index b696db8..c1b835f 100644 --- a/chrome/browser/history/typed_url_syncable_service.h +++ b/chrome/browser/history/typed_url_syncable_service.h @@ -10,12 +10,12 @@ #include "chrome/browser/history/history_notifications.h" #include "chrome/browser/history/history_types.h" -#include "content/public/common/page_transition_types.h" #include "sync/api/sync_change.h" #include "sync/api/sync_data.h" #include "sync/api/sync_error.h" #include "sync/api/sync_error_factory.h" #include "sync/api/syncable_service.h" +#include "ui/base/page_transition_types.h" class GURL; class TypedUrlSyncableServiceTest; @@ -57,7 +57,7 @@ class TypedUrlSyncableService : public syncer::SyncableService { // Called directly by HistoryBackend when local url data changes. void OnUrlsModified(URLRows* changed_urls); - void OnUrlVisited(content::PageTransition transition, URLRow* row); + void OnUrlVisited(ui::PageTransition transition, URLRow* row); void OnUrlsDeleted(bool all_history, bool expired, URLRows* rows); protected: @@ -86,7 +86,7 @@ class TypedUrlSyncableService : public syncer::SyncableService { // notification. We use this to throttle the number of sync changes we send // to the server so we don't hit the server for every // single typed URL visit. - bool ShouldSyncVisit(content::PageTransition transition, URLRow* row); + bool ShouldSyncVisit(ui::PageTransition transition, URLRow* row); // Utility routine that either updates an existing sync node or creates a // new one for the passed |typed_url| if one does not already exist. Returns diff --git a/chrome/browser/history/typed_url_syncable_service_unittest.cc b/chrome/browser/history/typed_url_syncable_service_unittest.cc index 5ff477d..8f3b912 100644 --- a/chrome/browser/history/typed_url_syncable_service_unittest.cc +++ b/chrome/browser/history/typed_url_syncable_service_unittest.cc @@ -103,12 +103,12 @@ class TypedUrlSyncableServiceTest : public testing::Test { static void AddNewestVisit(URLRow* url, VisitVector* visits, - content::PageTransition transition, + ui::PageTransition transition, int64 visit_time); static void AddOldestVisit(URLRow* url, VisitVector* visits, - content::PageTransition transition, + ui::PageTransition transition, int64 visit_time); static bool URLsEqual(URLRow& row, @@ -166,12 +166,12 @@ URLRow TypedUrlSyncableServiceTest::MakeTypedUrlRow( // Add a typed visit for time |last_visit|. visits->insert(first, VisitRow(history_url.id(), last_visit_time, 0, - content::PAGE_TRANSITION_TYPED, 0)); + ui::PAGE_TRANSITION_TYPED, 0)); } else { // Add a non-typed visit for time |last_visit|. visits->insert(first, VisitRow(history_url.id(), last_visit_time, 0, - content::PAGE_TRANSITION_RELOAD, 0)); + ui::PAGE_TRANSITION_RELOAD, 0)); } history_url.set_visit_count(visits->size()); @@ -181,13 +181,13 @@ URLRow TypedUrlSyncableServiceTest::MakeTypedUrlRow( void TypedUrlSyncableServiceTest::AddNewestVisit( URLRow* url, VisitVector* visits, - content::PageTransition transition, + ui::PageTransition transition, int64 visit_time) { base::Time time = base::Time::FromInternalValue(visit_time); visits->insert(visits->begin(), VisitRow(url->id(), time, 0, transition, 0)); - if (transition == content::PAGE_TRANSITION_TYPED) { + if (transition == ui::PAGE_TRANSITION_TYPED) { url->set_typed_count(url->typed_count() + 1); } @@ -198,12 +198,12 @@ void TypedUrlSyncableServiceTest::AddNewestVisit( void TypedUrlSyncableServiceTest::AddOldestVisit( URLRow* url, VisitVector* visits, - content::PageTransition transition, + ui::PageTransition transition, int64 visit_time) { base::Time time = base::Time::FromInternalValue(visit_time); visits->push_back(VisitRow(url->id(), time, 0, transition, 0)); - if (transition == content::PAGE_TRANSITION_TYPED) { + if (transition == ui::PAGE_TRANSITION_TYPED) { url->set_typed_count(url->typed_count() + 1); } @@ -311,7 +311,7 @@ TEST_F(TypedUrlSyncableServiceTest, UpdateLocalTypedUrlAndSync) { VisitVector visits = visit_vectors.front(); URLRows changed_urls; - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_TYPED, 7); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_TYPED, 7); static_cast<TestHistoryBackend*>(fake_history_backend_.get())-> SetVisitsForUrl(url_row.id(), &visits); changed_urls.push_back(url_row); @@ -363,11 +363,11 @@ TEST_F(TypedUrlSyncableServiceTest, LinkVisitLocalTypedUrlAndSync) { VisitVector visits = visit_vectors.front(); // Update the URL row, adding a non-typed visit to the visit vector. - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_LINK, 6); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_LINK, 6); static_cast<TestHistoryBackend*>(fake_history_backend_.get())-> SetVisitsForUrl(url_row.id(), &visits); - content::PageTransition transition = content::PAGE_TRANSITION_LINK; + ui::PageTransition transition = ui::PAGE_TRANSITION_LINK; // Notify typed url sync service of non-typed visit, expect no change. typed_url_sync_service_->OnUrlVisited(transition, &url_row); ASSERT_EQ(0u, changes.size()); @@ -387,14 +387,14 @@ TEST_F(TypedUrlSyncableServiceTest, TypedVisitLocalTypedUrlAndSync) { VisitVector visits = visit_vectors.front(); // Update the URL row, adding another typed visit to the visit vector. - AddOldestVisit(&url_row, &visits, content::PAGE_TRANSITION_LINK, 1); - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_LINK, 6); - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_TYPED, 7); + AddOldestVisit(&url_row, &visits, ui::PAGE_TRANSITION_LINK, 1); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_LINK, 6); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_TYPED, 7); static_cast<TestHistoryBackend*>(fake_history_backend_.get())-> SetVisitsForUrl(url_row.id(), &visits); // Notify typed url sync service of typed visit. - content::PageTransition transition = content::PAGE_TRANSITION_TYPED; + ui::PageTransition transition = ui::PAGE_TRANSITION_TYPED; typed_url_sync_service_->OnUrlVisited(transition, &url_row); ASSERT_EQ(1u, changes.size()); @@ -541,17 +541,17 @@ TEST_F(TypedUrlSyncableServiceTest, MaxVisitLocalTypedUrlAndSync) { // non-typed visits are expected to be skipped. int i = 1; for (; i <= kMaxTypedUrlVisits - 20; ++i) - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_TYPED, i); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_TYPED, i); for (; i <= kMaxTypedUrlVisits; ++i) - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_LINK, i); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_LINK, i); for (; i <= kMaxTypedUrlVisits + 10; ++i) - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_TYPED, i); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_TYPED, i); static_cast<TestHistoryBackend*>(fake_history_backend_.get())-> SetVisitsForUrl(url_row.id(), &visits); // Notify typed url sync service of typed visit. - content::PageTransition transition = content::PAGE_TRANSITION_TYPED; + ui::PageTransition transition = ui::PAGE_TRANSITION_TYPED; typed_url_sync_service_->OnUrlVisited(transition, &url_row); const syncer::SyncChangeList& changes = fake_change_processor_->changes(); @@ -568,7 +568,7 @@ TEST_F(TypedUrlSyncableServiceTest, MaxVisitLocalTypedUrlAndSync) { int num_other_visits_synced = 0; int r = url_specifics.visits_size() - 1; for (int i = 0; i < url_specifics.visits_size(); ++i, --r) { - if (url_specifics.visit_transitions(i) == content::PAGE_TRANSITION_TYPED) { + if (url_specifics.visit_transitions(i) == ui::PAGE_TRANSITION_TYPED) { ++num_typed_visits_synced; } else { ++num_other_visits_synced; @@ -592,13 +592,13 @@ TEST_F(TypedUrlSyncableServiceTest, ThrottleVisitLocalTypedUrlSync) { // Add enough visits to the url so that typed count is above the throttle // limit, and not right on the interval that gets synced. for (int i = 1; i < 42; ++i) - AddNewestVisit(&url_row, &visits, content::PAGE_TRANSITION_TYPED, i); + AddNewestVisit(&url_row, &visits, ui::PAGE_TRANSITION_TYPED, i); static_cast<TestHistoryBackend*>(fake_history_backend_.get())-> SetVisitsForUrl(url_row.id(), &visits); // Notify typed url sync service of typed visit. - content::PageTransition transition = content::PAGE_TRANSITION_TYPED; + ui::PageTransition transition = ui::PAGE_TRANSITION_TYPED; typed_url_sync_service_->OnUrlVisited(transition, &url_row); // Should throttle, so sync and local cache should not update. diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc index 232bc1f..b2aea16 100644 --- a/chrome/browser/history/url_index_private_data.cc +++ b/chrome/browser/history/url_index_private_data.cc @@ -1182,8 +1182,7 @@ bool URLIndexPrivateData::RestoreHistoryInfoMap( for (int i = 0; i < iter->visits_size(); ++i) { visits.push_back(std::make_pair( base::Time::FromInternalValue(iter->visits(i).visit_time()), - static_cast<content::PageTransition>(iter->visits(i). - transition_type()))); + ui::PageTransitionFromInt(iter->visits(i).transition_type()))); } history_info_map_[history_id].visits = visits; } diff --git a/chrome/browser/history/visit_database.cc b/chrome/browser/history/visit_database.cc index b2a4695..9a14490 100644 --- a/chrome/browser/history/visit_database.cc +++ b/chrome/browser/history/visit_database.cc @@ -14,8 +14,8 @@ #include "chrome/browser/history/visit_filter.h" #include "chrome/common/url_constants.h" #include "components/history/core/browser/url_database.h" -#include "content/public/common/page_transition_types.h" #include "sql/statement.h" +#include "ui/base/page_transition_types.h" namespace history { @@ -87,7 +87,7 @@ void VisitDatabase::FillVisitRow(sql::Statement& statement, VisitRow* visit) { visit->url_id = statement.ColumnInt64(1); visit->visit_time = base::Time::FromInternalValue(statement.ColumnInt64(2)); visit->referring_visit = statement.ColumnInt64(3); - visit->transition = content::PageTransitionFromInt(statement.ColumnInt(4)); + visit->transition = ui::PageTransitionFromInt(statement.ColumnInt(4)); visit->segment_id = statement.ColumnInt64(5); visit->visit_duration = base::TimeDelta::FromInternalValue(statement.ColumnInt64(6)); @@ -271,11 +271,11 @@ bool VisitDatabase::GetVisibleVisitsForURL(URLID url_id, statement.BindInt64(0, url_id); statement.BindInt64(1, options.EffectiveBeginTime()); statement.BindInt64(2, options.EffectiveEndTime()); - statement.BindInt(3, content::PAGE_TRANSITION_CHAIN_END); - statement.BindInt(4, content::PAGE_TRANSITION_CORE_MASK); - statement.BindInt(5, content::PAGE_TRANSITION_AUTO_SUBFRAME); - statement.BindInt(6, content::PAGE_TRANSITION_MANUAL_SUBFRAME); - statement.BindInt(7, content::PAGE_TRANSITION_KEYWORD_GENERATED); + statement.BindInt(3, ui::PAGE_TRANSITION_CHAIN_END); + statement.BindInt(4, ui::PAGE_TRANSITION_CORE_MASK); + statement.BindInt(5, ui::PAGE_TRANSITION_AUTO_SUBFRAME); + statement.BindInt(6, ui::PAGE_TRANSITION_MANUAL_SUBFRAME); + statement.BindInt(7, ui::PAGE_TRANSITION_KEYWORD_GENERATED); return FillVisitVectorWithOptions(statement, options, visits); } @@ -323,7 +323,7 @@ bool VisitDatabase::GetVisitsInRangeForTransition( base::Time begin_time, base::Time end_time, int max_results, - content::PageTransition transition, + ui::PageTransition transition, VisitVector* visits) { DCHECK(visits); visits->clear(); @@ -338,7 +338,7 @@ bool VisitDatabase::GetVisitsInRangeForTransition( int64 end = end_time.ToInternalValue(); statement.BindInt64(0, begin_time.ToInternalValue()); statement.BindInt64(1, end ? end : std::numeric_limits<int64>::max()); - statement.BindInt(2, content::PAGE_TRANSITION_CORE_MASK); + statement.BindInt(2, ui::PAGE_TRANSITION_CORE_MASK); statement.BindInt(3, transition); statement.BindInt64(4, max_results ? max_results : std::numeric_limits<int64>::max()); @@ -361,11 +361,11 @@ bool VisitDatabase::GetVisibleVisitsInRange(const QueryOptions& options, statement.BindInt64(0, options.EffectiveBeginTime()); statement.BindInt64(1, options.EffectiveEndTime()); - statement.BindInt(2, content::PAGE_TRANSITION_CHAIN_END); - statement.BindInt(3, content::PAGE_TRANSITION_CORE_MASK); - statement.BindInt(4, content::PAGE_TRANSITION_AUTO_SUBFRAME); - statement.BindInt(5, content::PAGE_TRANSITION_MANUAL_SUBFRAME); - statement.BindInt(6, content::PAGE_TRANSITION_KEYWORD_GENERATED); + statement.BindInt(2, ui::PAGE_TRANSITION_CHAIN_END); + statement.BindInt(3, ui::PAGE_TRANSITION_CORE_MASK); + statement.BindInt(4, ui::PAGE_TRANSITION_AUTO_SUBFRAME); + statement.BindInt(5, ui::PAGE_TRANSITION_MANUAL_SUBFRAME); + statement.BindInt(6, ui::PAGE_TRANSITION_KEYWORD_GENERATED); return FillVisitVectorWithOptions(statement, options, visits); } @@ -387,10 +387,10 @@ void VisitDatabase::GetDirectVisitsDuringTimes(const VisitFilter& time_filter, statement.BindInt64(0, it->first.ToInternalValue()); statement.BindInt64(1, it->second.ToInternalValue()); - statement.BindInt(2, content::PAGE_TRANSITION_CHAIN_START); - statement.BindInt(3, content::PAGE_TRANSITION_CORE_MASK); - statement.BindInt(4, content::PAGE_TRANSITION_TYPED); - statement.BindInt(5, content::PAGE_TRANSITION_AUTO_BOOKMARK); + statement.BindInt(2, ui::PAGE_TRANSITION_CHAIN_START); + statement.BindInt(3, ui::PAGE_TRANSITION_CORE_MASK); + statement.BindInt(4, ui::PAGE_TRANSITION_TYPED); + statement.BindInt(5, ui::PAGE_TRANSITION_AUTO_BOOKMARK); while (statement.Step()) { VisitRow visit; @@ -451,7 +451,7 @@ bool VisitDatabase::GetRedirectFromVisit(VisitID from_visit, "WHERE v.from_visit = ? " "AND (v.transition & ?) != 0")); // IS_REDIRECT_MASK statement.BindInt64(0, from_visit); - statement.BindInt(1, content::PAGE_TRANSITION_IS_REDIRECT_MASK); + statement.BindInt(1, ui::PAGE_TRANSITION_IS_REDIRECT_MASK); if (!statement.Step()) return false; // No redirect from this visit. (Or SQL error) @@ -516,11 +516,11 @@ bool VisitDatabase::GetVisibleVisitCountToHost(const GURL& url, statement.BindString(0, host_query_min); statement.BindString(1, host_query_min.substr(0, host_query_min.size() - 1) + '0'); - statement.BindInt(2, content::PAGE_TRANSITION_CHAIN_END); - statement.BindInt(3, content::PAGE_TRANSITION_CORE_MASK); - statement.BindInt(4, content::PAGE_TRANSITION_AUTO_SUBFRAME); - statement.BindInt(5, content::PAGE_TRANSITION_MANUAL_SUBFRAME); - statement.BindInt(6, content::PAGE_TRANSITION_KEYWORD_GENERATED); + statement.BindInt(2, ui::PAGE_TRANSITION_CHAIN_END); + statement.BindInt(3, ui::PAGE_TRANSITION_CORE_MASK); + statement.BindInt(4, ui::PAGE_TRANSITION_AUTO_SUBFRAME); + statement.BindInt(5, ui::PAGE_TRANSITION_MANUAL_SUBFRAME); + statement.BindInt(6, ui::PAGE_TRANSITION_KEYWORD_GENERATED); if (!statement.Step()) { // We've never been to this page before. @@ -617,7 +617,7 @@ void VisitDatabase::GetBriefVisitInfoOfMostRecentVisits( BriefVisitInfo info; info.url_id = statement.ColumnInt64(0); info.time = base::Time::FromInternalValue(statement.ColumnInt64(1)); - info.transition = content::PageTransitionFromInt(statement.ColumnInt(2)); + info.transition = ui::PageTransitionFromInt(statement.ColumnInt(2)); result_vector->push_back(info); } } diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h index e00f509..b8a175e 100644 --- a/chrome/browser/history/visit_database.h +++ b/chrome/browser/history/visit_database.h @@ -100,7 +100,7 @@ class VisitDatabase { bool GetVisitsInRangeForTransition(base::Time begin_time, base::Time end_time, int max_results, - content::PageTransition transition, + ui::PageTransition transition, VisitVector* visits); // Fills all visits in the given time range into the given vector that should diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc index 28c68dc..a47e05e 100644 --- a/chrome/browser/history/visit_database_unittest.cc +++ b/chrome/browser/history/visit_database_unittest.cc @@ -71,19 +71,19 @@ class VisitDatabaseTest : public PlatformTest, TEST_F(VisitDatabaseTest, Add) { // Add one visit. - VisitRow visit_info1(1, Time::Now(), 0, content::PAGE_TRANSITION_LINK, 0); + VisitRow visit_info1(1, Time::Now(), 0, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); // Add second visit for the same page. VisitRow visit_info2(visit_info1.url_id, visit_info1.visit_time + TimeDelta::FromSeconds(1), 1, - content::PAGE_TRANSITION_TYPED, 0); + ui::PAGE_TRANSITION_TYPED, 0); EXPECT_TRUE(AddVisit(&visit_info2, SOURCE_BROWSED)); // Add third visit for a different page. VisitRow visit_info3(2, visit_info1.visit_time + TimeDelta::FromSeconds(2), 0, - content::PAGE_TRANSITION_LINK, 0); + ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info3, SOURCE_BROWSED)); // Query the first two. @@ -102,17 +102,17 @@ TEST_F(VisitDatabaseTest, Delete) { // should link them. static const int kTime1 = 1000; VisitRow visit_info1(1, Time::FromInternalValue(kTime1), 0, - content::PAGE_TRANSITION_LINK, 0); + ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); static const int kTime2 = kTime1 + 1; VisitRow visit_info2(1, Time::FromInternalValue(kTime2), - visit_info1.visit_id, content::PAGE_TRANSITION_LINK, 0); + visit_info1.visit_id, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info2, SOURCE_BROWSED)); static const int kTime3 = kTime2 + 1; VisitRow visit_info3(1, Time::FromInternalValue(kTime3), - visit_info2.visit_id, content::PAGE_TRANSITION_LINK, 0); + visit_info2.visit_id, ui::PAGE_TRANSITION_LINK, 0); EXPECT_TRUE(AddVisit(&visit_info3, SOURCE_BROWSED)); // First make sure all the visits are there. @@ -138,13 +138,13 @@ TEST_F(VisitDatabaseTest, Delete) { TEST_F(VisitDatabaseTest, Update) { // Make something in the database. - VisitRow original(1, Time::Now(), 23, content::PageTransitionFromInt(0), 19); + VisitRow original(1, Time::Now(), 23, ui::PageTransitionFromInt(0), 19); AddVisit(&original, SOURCE_BROWSED); // Mutate that row. VisitRow modification(original); modification.url_id = 2; - modification.transition = content::PAGE_TRANSITION_TYPED; + modification.transition = ui::PAGE_TRANSITION_TYPED; modification.visit_time = Time::Now() + TimeDelta::FromDays(1); modification.referring_visit = 9292; UpdateVisitRow(modification); @@ -166,48 +166,48 @@ std::vector<VisitRow> GetTestVisitRows() { // Add one visit. VisitRow visit_info1(1, base_time + TimeDelta::FromMinutes(1), 0, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info1.visit_id = 1; // Add second visit for the same page. VisitRow visit_info2(visit_info1.url_id, visit_info1.visit_time + TimeDelta::FromSeconds(1), 1, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info2.visit_id = 2; // Add third visit for a different page. VisitRow visit_info3(2, visit_info1.visit_time + TimeDelta::FromSeconds(2), 0, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CHAIN_START), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CHAIN_START), 0); visit_info3.visit_id = 3; // Add a redirect visit from the last page. VisitRow visit_info4(3, visit_info1.visit_time + TimeDelta::FromSeconds(3), visit_info3.visit_id, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_SERVER_REDIRECT | - content::PAGE_TRANSITION_CHAIN_END), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_SERVER_REDIRECT | + ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info4.visit_id = 4; // Add a subframe visit. VisitRow visit_info5(4, visit_info1.visit_time + TimeDelta::FromSeconds(4), visit_info4.visit_id, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_AUTO_SUBFRAME | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_AUTO_SUBFRAME | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info5.visit_id = 5; @@ -215,10 +215,10 @@ std::vector<VisitRow> GetTestVisitRows() { // later than visit 2. VisitRow visit_info6(visit_info1.url_id, visit_info2.visit_time + TimeDelta::FromDays(1), 1, - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CHAIN_END), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CHAIN_END), 0); visit_info6.visit_id = 6; @@ -355,13 +355,13 @@ TEST_F(VisitDatabaseTest, GetVisibleVisitsInRange) { TEST_F(VisitDatabaseTest, VisitSource) { // Add visits. - VisitRow visit_info1(111, Time::Now(), 0, content::PAGE_TRANSITION_LINK, 0); + VisitRow visit_info1(111, Time::Now(), 0, ui::PAGE_TRANSITION_LINK, 0); ASSERT_TRUE(AddVisit(&visit_info1, SOURCE_BROWSED)); - VisitRow visit_info2(112, Time::Now(), 1, content::PAGE_TRANSITION_TYPED, 0); + VisitRow visit_info2(112, Time::Now(), 1, ui::PAGE_TRANSITION_TYPED, 0); ASSERT_TRUE(AddVisit(&visit_info2, SOURCE_SYNCED)); - VisitRow visit_info3(113, Time::Now(), 0, content::PAGE_TRANSITION_TYPED, 0); + VisitRow visit_info3(113, Time::Now(), 0, ui::PAGE_TRANSITION_TYPED, 0); ASSERT_TRUE(AddVisit(&visit_info3, SOURCE_EXTENSION)); // Query each visit. diff --git a/chrome/browser/infobars/infobar_service.cc b/chrome/browser/infobars/infobar_service.cc index a748e05..5037cc8 100644 --- a/chrome/browser/infobars/infobar_service.cc +++ b/chrome/browser/infobars/infobar_service.cc @@ -23,8 +23,8 @@ using infobars::InfoBarManager; namespace { bool IsReload(const content::LoadCommittedDetails& details) { - return content::PageTransitionStripQualifier( - details.entry->GetTransitionType()) == content::PAGE_TRANSITION_RELOAD; + return ui::PageTransitionStripQualifier( + details.entry->GetTransitionType()) == ui::PAGE_TRANSITION_RELOAD; } @@ -41,10 +41,10 @@ InfoBarDelegate::NavigationDetails navigation_details.did_replace_entry = details.did_replace_entry; navigation_details.is_main_frame = details.is_main_frame; - const content::PageTransition transition = details.entry->GetTransitionType(); + const ui::PageTransition transition = details.entry->GetTransitionType(); navigation_details.is_reload = IsReload(details); navigation_details.is_redirect = - (transition & content::PAGE_TRANSITION_IS_REDIRECT_MASK) != 0; + (transition & ui::PAGE_TRANSITION_IS_REDIRECT_MASK) != 0; return navigation_details; } diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.cc b/chrome/browser/infobars/insecure_content_infobar_delegate.cc index bba9988..fa90ef461 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.cc +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.cc @@ -13,9 +13,9 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" // static @@ -116,6 +116,6 @@ bool InsecureContentInfoBarDelegate::LinkClicked( "support/chrome/bin/answer.py?answer=1342714"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/local_discovery/privet_notifications.cc b/chrome/browser/local_discovery/privet_notifications.cc index 9d3c5f8..681539b 100644 --- a/chrome/browser/local_discovery/privet_notifications.cc +++ b/chrome/browser/local_discovery/privet_notifications.cc @@ -32,9 +32,9 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" #include "ui/message_center/notifier_settings.h" @@ -400,7 +400,7 @@ void PrivetNotificationDelegate::OpenTab(const GURL& url) { chrome::NavigateParams params(profile_obj, url, - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/browser/media/media_stream_infobar_delegate.cc b/chrome/browser/media/media_stream_infobar_delegate.cc index 90422d1..860b2dc 100644 --- a/chrome/browser/media/media_stream_infobar_delegate.cc +++ b/chrome/browser/media/media_stream_infobar_delegate.cc @@ -144,7 +144,7 @@ bool MediaStreamInfoBarDelegate::LinkClicked( GURL(chrome::kMediaAccessLearnMoreUrl), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; // Do not dismiss the info bar. } diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc index 71fd7fd..d046ac3 100644 --- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc +++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc @@ -60,7 +60,7 @@ void OpenURL(const GURL& url) { chrome::NavigateParams params( ProfileManager::GetActiveUserProfile(), GURL(url), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); params.disposition = NEW_FOREGROUND_TAB; params.host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; chrome::Navigate(¶ms); diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.cc b/chrome/browser/nacl_host/nacl_infobar_delegate.cc index 6fc29a0..2836dd3 100644 --- a/chrome/browser/nacl_host/nacl_infobar_delegate.cc +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.cc @@ -56,6 +56,6 @@ bool NaClInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { GURL("https://support.google.com/chrome/?p=ib_nacl"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/net/net_error_tab_helper.cc b/chrome/browser/net/net_error_tab_helper.cc index 948a0cf..b2cd40f 100644 --- a/chrome/browser/net/net_error_tab_helper.cc +++ b/chrome/browser/net/net_error_tab_helper.cc @@ -22,7 +22,7 @@ using chrome_common_net::DnsProbeStatus; using chrome_common_net::DnsProbeStatusToString; using content::BrowserContext; using content::BrowserThread; -using content::PageTransition; +using ui::PageTransition; using content::RenderViewHost; using content::WebContents; using content::WebContentsObserver; diff --git a/chrome/browser/net/net_error_tab_helper.h b/chrome/browser/net/net_error_tab_helper.h index 1104a96..89c623a 100644 --- a/chrome/browser/net/net_error_tab_helper.h +++ b/chrome/browser/net/net_error_tab_helper.h @@ -59,7 +59,7 @@ class NetErrorTabHelper virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; virtual void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, diff --git a/chrome/browser/net/net_error_tab_helper_unittest.cc b/chrome/browser/net/net_error_tab_helper_unittest.cc index 3a98799..7dea643 100644 --- a/chrome/browser/net/net_error_tab_helper_unittest.cc +++ b/chrome/browser/net/net_error_tab_helper_unittest.cc @@ -7,9 +7,9 @@ #include "chrome/common/net/net_error_info.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "content/public/browser/browser_thread.h" -#include "content/public/common/page_transition_types.h" #include "net/base/net_errors.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" using chrome_browser_net::NetErrorTabHelper; using chrome_common_net::DnsProbeStatus; @@ -76,7 +76,7 @@ class NetErrorTabHelperTest : public ChromeRenderViewHostTestHarness { tab_helper_->DidCommitProvisionalLoadForFrame( (main_frame == MAIN_FRAME) ? main_rfh() : subframe_, bogus_url_, // url - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } void FailProvisionalLoad(MainFrame main_frame, ErrorType error_type) { diff --git a/chrome/browser/net/sdch_browsertest.cc b/chrome/browser/net/sdch_browsertest.cc index 0401b25..2e552e7 100644 --- a/chrome/browser/net/sdch_browsertest.cc +++ b/chrome/browser/net/sdch_browsertest.cc @@ -400,7 +400,7 @@ class SdchBrowserTest : public InProcessBrowserTest, net::URLFetcherDelegate { chrome::AddSelectedTabWithURL(second_browser_, GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); content::WaitForLoadStop( second_browser_->tab_strip_model()->GetActiveWebContents()); second_browser_->window()->Show(); diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc index 5be0b9c..f936e1c 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.cc @@ -62,6 +62,6 @@ bool DataReductionProxyInfoBarDelegate::LinkClicked( GURL(link_url_), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return true; } diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc index 84019ce..dd3a82a 100644 --- a/chrome/browser/notifications/extension_welcome_notification.cc +++ b/chrome/browser/notifications/extension_welcome_notification.cc @@ -80,7 +80,7 @@ class NotificationCallbacks chrome::NavigateParams params( profile_, GURL(chrome::kNotificationWelcomeLearnMoreURL), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; params.window_action = chrome::NavigateParams::SHOW_WINDOW; chrome::Navigate(¶ms); diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc index c9644bd..fb631fc 100644 --- a/chrome/browser/password_manager/password_manager_browsertest.cc +++ b/chrome/browser/password_manager/password_manager_browsertest.cc @@ -1015,7 +1015,7 @@ IN_PROC_BROWSER_TEST_F(PasswordManagerBrowserTest, NoPromptWhenReloading) { PromptObserver::Create(WebContents())); GURL url = embedded_test_server()->GetURL("/password/password_form.html"); chrome::NavigateParams params(browser(), url, - content::PAGE_TRANSITION_RELOAD); + ui::PAGE_TRANSITION_RELOAD); ui_test_utils::NavigateToURL(¶ms); observer.Wait(); EXPECT_FALSE(prompt_observer->IsShowingPrompt()); diff --git a/chrome/browser/pepper_broker_infobar_delegate.cc b/chrome/browser/pepper_broker_infobar_delegate.cc index e47326d..d4fd747 100644 --- a/chrome/browser/pepper_broker_infobar_delegate.cc +++ b/chrome/browser/pepper_broker_infobar_delegate.cc @@ -137,7 +137,7 @@ bool PepperBrokerInfoBarDelegate::LinkClicked( content::OpenURLParams( learn_more_url, content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/platform_util_chromeos.cc b/chrome/browser/platform_util_chromeos.cc index fc1a476..aad0b73 100644 --- a/chrome/browser/platform_util_chromeos.cc +++ b/chrome/browser/platform_util_chromeos.cc @@ -42,7 +42,7 @@ void OpenExternal(Profile* profile, const GURL& url) { // this function directly and which would therefore break (e.g. // "Browser::EmailPageLocation" (to name only one). // As such we should keep this code here. - chrome::NavigateParams params(profile, url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(profile, url, ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; params.host_desktop_type = chrome::HOST_DESKTOP_TYPE_ASH; diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc index c032089..947d077 100644 --- a/chrome/browser/plugins/plugin_infobar_delegates.cc +++ b/chrome/browser/plugins/plugin_infobar_delegates.cc @@ -62,7 +62,7 @@ bool PluginInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { content::OpenURLParams( GURL(GetLearnMoreURL()), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } @@ -401,7 +401,7 @@ bool PluginInstallerInfoBarDelegate::LinkClicked( content::OpenURLParams( url, content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } @@ -521,7 +521,7 @@ bool PluginMetroModeInfoBarDelegate::LinkClicked( "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/plugins/plugin_installer.cc b/chrome/browser/plugins/plugin_installer.cc index 7c5ae85..bef3f4d 100644 --- a/chrome/browser/plugins/plugin_installer.cc +++ b/chrome/browser/plugins/plugin_installer.cc @@ -132,7 +132,7 @@ void PluginInstaller::OpenDownloadURL(const GURL& plugin_url, plugin_url, content::Referrer(web_contents->GetURL(), blink::WebReferrerPolicyDefault), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, false)); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, false)); FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadFinished()); } diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc index f869457..5e49883bd 100644 --- a/chrome/browser/plugins/plugin_observer.cc +++ b/chrome/browser/plugins/plugin_observer.cc @@ -454,7 +454,7 @@ void PluginObserver::OnOpenAboutPlugins() { GURL(chrome::kChromeUIPluginsURL), content::Referrer(web_contents()->GetURL(), blink::WebReferrerPolicyDefault), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); } void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 962015e..e8e1a4a 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -112,7 +112,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/content_constants.h" #include "content/public/common/content_paths.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/process_type.h" #include "content/public/common/result_codes.h" #include "content/public/common/url_constants.h" @@ -142,6 +141,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" #include "url/gurl.h" @@ -2804,7 +2804,7 @@ IN_PROC_BROWSER_TEST_P(RestoreOnStartupPolicyTest, PRE_RunTest) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), GURL(kRestoredURLs[i]), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); observer.Wait(); } } diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc index ab2f4ce..7b11d46 100644 --- a/chrome/browser/prerender/prerender_browsertest.cc +++ b/chrome/browser/prerender/prerender_browsertest.cc @@ -1145,7 +1145,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { bool expect_swap_to_succeed) const { NavigateToURLWithParams( content::OpenURLParams(dest_url_, Referrer(), disposition, - content::PAGE_TRANSITION_TYPED, false), + ui::PAGE_TRANSITION_TYPED, false), expect_swap_to_succeed); } @@ -1165,7 +1165,7 @@ class PrerenderBrowserTest : virtual public InProcessBrowserTest { bool expect_swap_to_succeed) const { NavigateToURLWithParams( content::OpenURLParams(dest_url, Referrer(), disposition, - content::PAGE_TRANSITION_TYPED, false), + ui::PAGE_TRANSITION_TYPED, false), expect_swap_to_succeed); } @@ -2139,7 +2139,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, GetActiveWebContents(), 2); current_browser()->OpenURL(OpenURLParams( navigate_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); swap_observer.Wait(); EXPECT_TRUE(DidDisplayPass(GetActiveWebContents())); @@ -2632,7 +2632,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) { LoadURL( GURL(content::kChromeUICrashURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, std::string()); prerender->WaitForStop(); } @@ -3931,7 +3931,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderExtraHeadersNoSwap) { FINAL_STATUS_APP_TERMINATING, 1); content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false); + ui::PAGE_TRANSITION_TYPED, false); params.extra_headers = "X-Custom-Header: 42\r\n"; NavigateToURLWithParams(params, false); } @@ -3945,7 +3945,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, std::string post_data = "DATA"; content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false); + ui::PAGE_TRANSITION_TYPED, false); params.uses_post = true; params.browser_initiated_post_data = base::RefCountedString::TakeString(&post_data); @@ -4082,7 +4082,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderReplaceCurrentEntry) { PrerenderTestURL("files/prerender/prerender_page.html", FINAL_STATUS_USED, 1); content::OpenURLParams params(dest_url(), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false); + ui::PAGE_TRANSITION_TYPED, false); params.should_replace_current_entry = true; NavigateToURLWithParams(params, false); @@ -4131,9 +4131,9 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderDoublePendingSwap) { current_browser()->tab_strip_model(), GetActiveWebContents(), 2); current_browser()->OpenURL(OpenURLParams( - url1, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url1, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); current_browser()->OpenURL(OpenURLParams( - url2, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url2, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); swap_observer.Wait(); // The WebContents should be on url2. There may be 2 or 3 entries, depending @@ -4175,7 +4175,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, &GetActiveWebContents()->GetController())); current_browser()->OpenURL(OpenURLParams( dest_url(), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); page_load_observer.Wait(); // Navigate somewhere else. This should succeed and abort the pending swap. @@ -4183,7 +4183,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, current_browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); nav_observer.Wait(); } diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index 4821d1b..ae70ddc 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc @@ -38,8 +38,8 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/common/frame_navigate_params.h" -#include "content/public/common/page_transition_types.h" #include "net/url_request/url_request_context_getter.h" +#include "ui/base/page_transition_types.h" #include "ui/gfx/rect.h" using content::BrowserThread; @@ -382,15 +382,15 @@ void PrerenderContents::StartPrerendering( content::NavigationController::LoadURLParams load_url_params( prerender_url_); load_url_params.referrer = referrer_; - load_url_params.transition_type = content::PAGE_TRANSITION_LINK; + load_url_params.transition_type = ui::PAGE_TRANSITION_LINK; if (origin_ == ORIGIN_OMNIBOX) { - load_url_params.transition_type = content::PageTransitionFromInt( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR); + load_url_params.transition_type = ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); } else if (origin_ == ORIGIN_INSTANT) { - load_url_params.transition_type = content::PageTransitionFromInt( - content::PAGE_TRANSITION_GENERATED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR); + load_url_params.transition_type = ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_GENERATED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR); } load_url_params.override_user_agent = prerender_manager_->config().is_overriding_user_agent ? diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc index 4036482..09af20f 100644 --- a/chrome/browser/prerender/prerender_local_predictor.cc +++ b/chrome/browser/prerender/prerender_local_predictor.cc @@ -39,12 +39,12 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "crypto/secure_hash.h" #include "grit/browser_resources.h" #include "net/base/escape.h" #include "net/base/load_flags.h" #include "net/url_request/url_fetcher.h" +#include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" #include "url/url_canon.h" @@ -52,7 +52,7 @@ using base::DictionaryValue; using base::ListValue; using base::Value; using content::BrowserThread; -using content::PageTransition; +using ui::PageTransition; using content::RenderFrameHost; using content::SessionStorageNamespace; using content::WebContents; @@ -249,20 +249,20 @@ int GetMaxLocalPredictionTimeMs() { } bool IsBackForward(PageTransition transition) { - return (transition & content::PAGE_TRANSITION_FORWARD_BACK) != 0; + return (transition & ui::PAGE_TRANSITION_FORWARD_BACK) != 0; } bool IsHomePage(PageTransition transition) { - return (transition & content::PAGE_TRANSITION_HOME_PAGE) != 0; + return (transition & ui::PAGE_TRANSITION_HOME_PAGE) != 0; } bool IsIntermediateRedirect(PageTransition transition) { - return (transition & content::PAGE_TRANSITION_CHAIN_END) == 0; + return (transition & ui::PAGE_TRANSITION_CHAIN_END) == 0; } bool IsFormSubmit(PageTransition transition) { - return PageTransitionCoreTypeIs(transition, - content::PAGE_TRANSITION_FORM_SUBMIT); + return ui::PageTransitionCoreTypeIs(transition, + ui::PAGE_TRANSITION_FORM_SUBMIT); } bool ShouldExcludeTransitionForPrediction(PageTransition transition) { diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc index 396a502..2baad06 100644 --- a/chrome/browser/prerender/prerender_manager.cc +++ b/chrome/browser/prerender/prerender_manager.cc @@ -1110,7 +1110,7 @@ void PrerenderManager::PendingSwap::ProvisionalChangeToMainFrameUrl( void PrerenderManager::PendingSwap::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { if (render_frame_host->GetParent()) return; prerender_data_->ClearPendingSwap(); diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index 11f1ef5..8fc5a1a 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -484,7 +484,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; virtual void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, diff --git a/chrome/browser/prerender/prerender_tab_helper.cc b/chrome/browser/prerender/prerender_tab_helper.cc index 64b9a39..8ddd08a 100644 --- a/chrome/browser/prerender/prerender_tab_helper.cc +++ b/chrome/browser/prerender/prerender_tab_helper.cc @@ -99,7 +99,7 @@ void PrerenderTabHelper::ProvisionalChangeToMainFrameUrl( void PrerenderTabHelper::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { if (render_frame_host->GetParent()) return; RecordEvent(EVENT_MAINFRAME_COMMIT); diff --git a/chrome/browser/prerender/prerender_tab_helper.h b/chrome/browser/prerender/prerender_tab_helper.h index 260091d..361ee8f 100644 --- a/chrome/browser/prerender/prerender_tab_helper.h +++ b/chrome/browser/prerender/prerender_tab_helper.h @@ -64,7 +64,7 @@ class PrerenderTabHelper virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; // Called when a password form has been submitted. void PasswordSubmitted(const autofill::PasswordForm& form); diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc index 34f68ed..cbd935b 100644 --- a/chrome/browser/printing/print_dialog_cloud.cc +++ b/chrome/browser/printing/print_dialog_cloud.cc @@ -731,7 +731,7 @@ void CreateCloudPrintSigninTab(Browser* browser, url, g_browser_process->GetApplicationLocale()), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); new SignInObserver(web_contents, cloud_devices::GetCloudPrintURL(), callback); diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc index c8e50d2..aac04bc 100644 --- a/chrome/browser/printing/print_preview_dialog_controller.cc +++ b/chrome/browser/printing/print_preview_dialog_controller.cc @@ -337,13 +337,13 @@ void PrintPreviewDialogController::OnNavEntryCommitted( if (contents == preview_dialog) { // Preview dialog navigated. if (details) { - content::PageTransition transition_type = + ui::PageTransition transition_type = details->entry->GetTransitionType(); content::NavigationType nav_type = details->type; // New |preview_dialog| is created. Don't update/erase map entry. if (waiting_for_new_preview_page_ && - transition_type == content::PAGE_TRANSITION_AUTO_TOPLEVEL && + transition_type == ui::PAGE_TRANSITION_AUTO_TOPLEVEL && nav_type == content::NAVIGATION_TYPE_NEW_PAGE) { waiting_for_new_preview_page_ = false; SaveInitiatorTitle(preview_dialog); @@ -352,7 +352,7 @@ void PrintPreviewDialogController::OnNavEntryCommitted( // Cloud print sign-in causes a reload. if (!waiting_for_new_preview_page_ && - transition_type == content::PAGE_TRANSITION_RELOAD && + transition_type == ui::PAGE_TRANSITION_RELOAD && nav_type == content::NAVIGATION_TYPE_EXISTING_PAGE && IsPrintPreviewURL(details->previous_url)) { return; diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index 0ebe12d..f6fa9d6 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc @@ -1296,7 +1296,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { OpenURL(handlers[handlerIndex].TranslateUrl(params_.link_url), GetDocumentURL(params_), disposition, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); return; } @@ -1308,19 +1308,19 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { GetDocumentURL(params_), !browser || browser->is_app() ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); break; } case IDC_CONTENT_CONTEXT_OPENLINKNEWWINDOW: OpenURL(params_.link_url, GetDocumentURL(params_), NEW_WINDOW, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); break; case IDC_CONTENT_CONTEXT_OPENLINKOFFTHERECORD: OpenURL(params_.link_url, GURL(), OFF_THE_RECORD, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); break; case IDC_CONTENT_CONTEXT_SAVELINKAS: { @@ -1379,7 +1379,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { OpenURL(params_.src_url, GetDocumentURL(params_), NEW_BACKGROUND_TAB, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); break; case IDC_CONTENT_CONTEXT_PLAYPAUSE: { @@ -1623,14 +1623,14 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { WindowOpenDisposition disposition = ForceNewTabDispositionFromEventFlags(event_flags); OpenURL(selection_navigation_url_, GURL(), disposition, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); break; } case IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS: { WindowOpenDisposition disposition = ForceNewTabDispositionFromEventFlags(event_flags); GURL url = chrome::GetSettingsUrl(chrome::kLanguageOptionsSubPage); - OpenURL(url, GURL(), disposition, content::PAGE_TRANSITION_LINK); + OpenURL(url, GURL(), disposition, ui::PAGE_TRANSITION_LINK); break; } @@ -1640,7 +1640,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { WindowOpenDisposition disposition = ForceNewTabDispositionFromEventFlags(event_flags); GURL url = chrome::GetSettingsUrl(chrome::kHandlerSettingsSubPage); - OpenURL(url, GURL(), disposition, content::PAGE_TRANSITION_LINK); + OpenURL(url, GURL(), disposition, ui::PAGE_TRANSITION_LINK); break; } diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h index bbf8b0a..a2a65a4 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -19,7 +19,6 @@ #include "components/renderer_context_menu/render_view_context_menu_observer.h" #include "components/renderer_context_menu/render_view_context_menu_proxy.h" #include "content/public/common/context_menu_params.h" -#include "content/public/common/page_transition_types.h" #include "ui/base/models/simple_menu_model.h" #include "ui/base/window_open_disposition.h" diff --git a/chrome/browser/renderer_context_menu/spelling_bubble_model.cc b/chrome/browser/renderer_context_menu/spelling_bubble_model.cc index 1f3136a..9f66ef7 100644 --- a/chrome/browser/renderer_context_menu/spelling_bubble_model.cc +++ b/chrome/browser/renderer_context_menu/spelling_bubble_model.cc @@ -66,7 +66,7 @@ base::string16 SpellingBubbleModel::GetLinkText() const { void SpellingBubbleModel::LinkClicked() { OpenURLParams params( GURL(chrome::kPrivacyLearnMoreURL), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); web_contents_->OpenURL(params); } diff --git a/chrome/browser/repost_form_warning_browsertest.cc b/chrome/browser/repost_form_warning_browsertest.cc index a8b28e0..0a17796 100644 --- a/chrome/browser/repost_form_warning_browsertest.cc +++ b/chrome/browser/repost_form_warning_browsertest.cc @@ -74,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(RepostFormWarningTest, TestLoginAfterRepost) { content::Source<content::NavigationController>(&controller)); browser()->OpenURL(content::OpenURLParams( test_server()->GetURL("auth-basic"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); observer.Wait(); // Try to reload it again. @@ -86,6 +86,6 @@ IN_PROC_BROWSER_TEST_F(RepostFormWarningTest, TestLoginAfterRepost) { content::TestNavigationObserver navigation_observer(web_contents); browser()->OpenURL(content::OpenURLParams( test_server()->GetURL("bar"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); navigation_observer.Wait(); } diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index d6fac06..90223fc 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -426,7 +426,7 @@ void RLZTracker::Observe(int type, content::Details<content::NavigationEntry>(details).ptr(); if (entry != NULL && ((entry->GetTransitionType() & - content::PAGE_TRANSITION_HOME_PAGE) != 0)) { + ui::PAGE_TRANSITION_HOME_PAGE) != 0)) { RecordFirstSearch(ChromeHomePage()); registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, content::NotificationService::AllSources()); diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc index 15ed34a..23e1dc1 100644 --- a/chrome/browser/rlz/rlz_unittest.cc +++ b/chrome/browser/rlz/rlz_unittest.cc @@ -252,7 +252,7 @@ void RlzLibTest::SimulateOmniboxUsage() { void RlzLibTest::SimulateHomepageUsage() { scoped_ptr<NavigationEntry> entry(NavigationEntry::Create()); entry->SetPageID(0); - entry->SetTransitionType(content::PAGE_TRANSITION_HOME_PAGE); + entry->SetTransitionType(ui::PAGE_TRANSITION_HOME_PAGE); tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING, content::NotificationService::AllSources(), content::Details<NavigationEntry>(entry.get())); @@ -827,7 +827,7 @@ TEST_F(RlzLibTest, PingUpdatesRlzCache) { TEST_F(RlzLibTest, ObserveHandlesBadArgs) { scoped_ptr<NavigationEntry> entry(NavigationEntry::Create()); entry->SetPageID(0); - entry->SetTransitionType(content::PAGE_TRANSITION_LINK); + entry->SetTransitionType(ui::PAGE_TRANSITION_LINK); tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING, content::NotificationService::AllSources(), content::Details<NavigationEntry>(NULL)); diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc index 0a37c7f..4bb6e5d 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc @@ -25,7 +25,7 @@ #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" using content::BrowserThread; @@ -122,7 +122,7 @@ static void AddNavigationFeatures( request); AddFeature(feature_prefix + features::kPageTransitionType, static_cast<double>( - content::PageTransitionStripQualifier( + ui::PageTransitionStripQualifier( entry->GetTransitionType())), request); AddFeature(feature_prefix + features::kIsFirstNavigation, @@ -345,17 +345,17 @@ void BrowserFeatureExtractor::QueryUrlHistoryDone( for (history::VisitVector::const_iterator it = visits.begin(); it != visits.end(); ++it) { - if (!content::PageTransitionIsMainFrame(it->transition)) { + if (!ui::PageTransitionIsMainFrame(it->transition)) { continue; } if (it->visit_time < threshold) { ++num_visits_24h_ago; } - content::PageTransition transition = content::PageTransitionStripQualifier( + ui::PageTransition transition = ui::PageTransitionStripQualifier( it->transition); - if (transition == content::PAGE_TRANSITION_TYPED) { + if (transition == ui::PAGE_TRANSITION_TYPED) { ++num_visits_typed; - } else if (transition == content::PAGE_TRANSITION_LINK) { + } else if (transition == ui::PAGE_TRANSITION_LINK) { ++num_visits_link; } } diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc index 2fc6fec..793dda3 100644 --- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc +++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc @@ -26,12 +26,12 @@ #include "chrome/test/base/testing_profile.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/referrer.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/web_contents_tester.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" using content::BrowserThread; @@ -121,14 +121,14 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness { std::vector<GURL> redirect_chain; redirect_chain.push_back(url); SetRedirectChain(redirect_chain, true); - NavigateAndCommit(url, GURL(), content::PAGE_TRANSITION_LINK); + NavigateAndCommit(url, GURL(), ui::PAGE_TRANSITION_LINK); } // This is similar to NavigateAndCommit that is in WebContentsTester, but // allows us to specify the referrer and page_transition_type. void NavigateAndCommit(const GURL& url, const GURL& referrer, - content::PageTransition type) { + ui::PageTransition type) { web_contents()->GetController().LoadURL( url, content::Referrer(referrer, blink::WebReferrerPolicyDefault), type, std::string()); @@ -269,17 +269,17 @@ TEST_F(BrowserFeatureExtractorTest, UrlInHistory) { history_service()->AddPage(GURL("http://www.foo.com/bar.html?a=b"), base::Time::Now() - base::TimeDelta::FromHours(23), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); history_service()->AddPage(GURL("http://www.foo.com/bar.html"), base::Time::Now() - base::TimeDelta::FromHours(25), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); history_service()->AddPage(GURL("https://www.foo.com/goo.html"), base::Time::Now() - base::TimeDelta::FromDays(5), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); SimpleNavigateAndCommit(GURL("http://www.foo.com/bar.html")); @@ -372,9 +372,9 @@ TEST_F(BrowserFeatureExtractorTest, BrowseFeatures) { browse_info_->http_status_code = 200; NavigateAndCommit(GURL("http://www.foo.com/"), GURL("http://google.com/"), - content::PageTransitionFromInt( - content::PAGE_TRANSITION_AUTO_BOOKMARK | - content::PAGE_TRANSITION_FORWARD_BACK)); + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_AUTO_BOOKMARK | + ui::PAGE_TRANSITION_FORWARD_BACK)); EXPECT_TRUE(ExtractFeatures(&request)); std::map<std::string, double> features; @@ -410,10 +410,10 @@ TEST_F(BrowserFeatureExtractorTest, BrowseFeatures) { browse_info_->http_status_code = 404; NavigateAndCommit(GURL("http://www.foo.com/page.html"), GURL("http://www.foo.com"), - content::PageTransitionFromInt( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_CHAIN_START | - content::PAGE_TRANSITION_CLIENT_REDIRECT)); + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_CHAIN_START | + ui::PAGE_TRANSITION_CLIENT_REDIRECT)); EXPECT_TRUE(ExtractFeatures(&request)); features.clear(); @@ -463,10 +463,10 @@ TEST_F(BrowserFeatureExtractorTest, BrowseFeatures) { SetRedirectChain(redirect_chain, true); NavigateAndCommit(GURL("http://www.bar.com/"), GURL("http://www.foo.com/page.html"), - content::PageTransitionFromInt( - content::PAGE_TRANSITION_LINK | - content::PAGE_TRANSITION_CHAIN_END | - content::PAGE_TRANSITION_CLIENT_REDIRECT)); + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_LINK | + ui::PAGE_TRANSITION_CHAIN_END | + ui::PAGE_TRANSITION_CLIENT_REDIRECT)); EXPECT_TRUE(ExtractFeatures(&request)); features.clear(); @@ -502,7 +502,7 @@ TEST_F(BrowserFeatureExtractorTest, BrowseFeatures) { SetRedirectChain(redirect_chain, false); NavigateAndCommit(GURL("http://www.bar.com/other_page.html"), GURL("http://www.bar.com/"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); EXPECT_TRUE(ExtractFeatures(&request)); features.clear(); @@ -542,7 +542,7 @@ TEST_F(BrowserFeatureExtractorTest, BrowseFeatures) { SetRedirectChain(redirect_chain, true); NavigateAndCommit(GURL("http://www.baz.com"), GURL("https://bankofamerica.com"), - content::PAGE_TRANSITION_GENERATED); + ui::PAGE_TRANSITION_GENERATED); EXPECT_TRUE(ExtractFeatures(&request)); features.clear(); diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc index 20590b5..7ff86627 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc @@ -380,7 +380,7 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness { void NavigateWithSBHitAndCommit(const GURL& url) { // Create a pending navigation. controller().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); ASSERT_TRUE(pending_rvh()); if (web_contents()->GetRenderViewHost()->GetProcess()->GetID() == @@ -415,7 +415,7 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness { void NavigateWithoutSBHitAndCommit(const GURL& safe_url) { controller().LoadURL( - safe_url, content::Referrer(), content::PAGE_TRANSITION_LINK, + safe_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); ASSERT_TRUE(pending_rvh()); diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc index bedb410..d9edf0f 100644 --- a/chrome/browser/safe_browsing/download_protection_service.cc +++ b/chrome/browser/safe_browsing/download_protection_service.cc @@ -993,7 +993,7 @@ void DownloadProtectionService::ShowDetailsForDownload( content::OpenURLParams(learn_more_url, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc index 9242ef4..7db845a 100644 --- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc @@ -1290,7 +1290,7 @@ TEST_F(DownloadProtectionServiceTest, 0, GURL(), redirects, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc index a952b1f..1431f61 100644 --- a/chrome/browser/safe_browsing/malware_details_unittest.cc +++ b/chrome/browser/safe_browsing/malware_details_unittest.cc @@ -312,7 +312,7 @@ class MalwareDetailsTest : public ChromeRenderViewHostTestHarness { redirects->push_back(url); history_service()->AddPage( url, base::Time::Now(), reinterpret_cast<history::ContextID>(1), 0, - GURL(), *redirects, content::PAGE_TRANSITION_TYPED, + GURL(), *redirects, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); } @@ -323,7 +323,7 @@ class MalwareDetailsTest : public ChromeRenderViewHostTestHarness { TEST_F(MalwareDetailsTest, MalwareSubResource) { // Start a load. controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -355,7 +355,7 @@ TEST_F(MalwareDetailsTest, MalwareSubResource) { // different original_url. TEST_F(MalwareDetailsTest, MalwareSubResourceWithOriginalUrl) { controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -395,7 +395,7 @@ TEST_F(MalwareDetailsTest, MalwareSubResourceWithOriginalUrl) { // Tests creating a malware report with data from the renderer. TEST_F(MalwareDetailsTest, MalwareDOMDetails) { controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -450,7 +450,7 @@ TEST_F(MalwareDetailsTest, MalwareDOMDetails) { // Verify that https:// urls are dropped. TEST_F(MalwareDetailsTest, NotPublicUrl) { controller().LoadURL(GURL(kHttpsURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); scoped_refptr<MalwareDetailsWrap> report = new MalwareDetailsWrap( @@ -474,7 +474,7 @@ TEST_F(MalwareDetailsTest, NotPublicUrl) { // resource url TEST_F(MalwareDetailsTest, MalwareWithRedirectUrl) { controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -526,7 +526,7 @@ TEST_F(MalwareDetailsTest, MalwareWithRedirectUrl) { // Tests the interaction with the HTTP cache. TEST_F(MalwareDetailsTest, HTTPCache) { controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -598,7 +598,7 @@ TEST_F(MalwareDetailsTest, HTTPCache) { // Tests the interaction with the HTTP cache (where the cache is empty). TEST_F(MalwareDetailsTest, HTTPCacheNoEntries) { controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); @@ -651,7 +651,7 @@ TEST_F(MalwareDetailsTest, HistoryServiceUrls) { profile()->BlockUntilHistoryProcessesPendingRequests(); controller().LoadURL(GURL(kLandingURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); UnsafeResource resource; InitResource(&resource, true, GURL(kMalwareURL)); diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index be1adc9..ebd0b7d 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc @@ -276,7 +276,7 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { OpenURLParams params(learn_more_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); web_contents_->OpenURL(params); return; @@ -292,7 +292,7 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { OpenURLParams params(privacy_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); web_contents_->OpenURL(params); return; @@ -329,7 +329,7 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { web_contents_->GetController().LoadURL( GURL(chrome::kChromeUINewTabURL), content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } return; @@ -371,7 +371,7 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { unsafe_resources_[element_index].threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); OpenURLParams params( - diagnostic_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_LINK, + diagnostic_url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false); web_contents_->OpenURL(params); return; diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc index 3043a95..4e32b24 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc @@ -124,7 +124,7 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness { void Navigate(const char* url, int page_id) { WebContentsTester::For(web_contents())->TestDidNavigate( web_contents()->GetMainFrame(), page_id, GURL(url), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } void GoBack(bool is_cross_site) { @@ -141,7 +141,7 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness { rfh, entry->GetPageID(), GURL(entry->GetURL()), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } void ShowInterstitial(bool is_subresource, const char* url) { @@ -220,7 +220,7 @@ TEST_F(SafeBrowsingBlockingPageTest, MalwarePageDontProceed) { // Start a load. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing a safe browsing interstitial to be shown. @@ -256,7 +256,7 @@ TEST_F(SafeBrowsingBlockingPageTest, MalwarePageProceed) { // Start a load. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing a safe browsing interstitial to be shown. ShowInterstitial(false, kBadURL); @@ -520,7 +520,7 @@ TEST_F(SafeBrowsingBlockingPageTest, NavigatingBackAndForth) { // Now navigate to a bad page triggerring an interstitial. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); ShowInterstitial(false, kBadURL); SafeBrowsingBlockingPage* sb_interstitial = GetSafeBrowsingBlockingPage(); @@ -567,7 +567,7 @@ TEST_F(SafeBrowsingBlockingPageTest, ProceedThenDontProceed) { // Start a load. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing a safe browsing interstitial to be shown. ShowInterstitial(false, kBadURL); @@ -604,7 +604,7 @@ TEST_F(SafeBrowsingBlockingPageTest, MalwareReportsDisabled) { // Start a load. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing a safe browsing interstitial to be shown. ShowInterstitial(false, kBadURL); @@ -639,7 +639,7 @@ TEST_F(SafeBrowsingBlockingPageTest, MalwareReportsToggling) { // Start a load. controller().LoadURL(GURL(kBadURL), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); // Simulate the load causing a safe browsing interstitial to be shown. ShowInterstitial(false, kBadURL); diff --git a/chrome/browser/search/search_terms_tracker.cc b/chrome/browser/search/search_terms_tracker.cc index a99f915..444ab5f 100644 --- a/chrome/browser/search/search_terms_tracker.cc +++ b/chrome/browser/search/search_terms_tracker.cc @@ -112,7 +112,7 @@ bool SearchTermsTracker::FindMostRecentSearch( // Do not consider any navigations that precede a non-web-triggerable // navigation as they are not related to those terms. - if (!content::PageTransitionIsWebTriggerable( + if (!ui::PageTransitionIsWebTriggerable( entry->GetTransitionType())) { break; } diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc index 0326078..ad923b4 100644 --- a/chrome/browser/search/search_unittest.cc +++ b/chrome/browser/search/search_unittest.cc @@ -291,7 +291,7 @@ TEST_F(SearchTest, ProcessIsolation_RendererInitiated) { content::NavigationController::LoadURLParams load_params( GURL(test.end_url)); load_params.is_renderer_initiated = true; - load_params.transition_type = content::PAGE_TRANSITION_LINK; + load_params.transition_type = ui::PAGE_TRANSITION_LINK; controller->LoadURLWithParams(load_params); CommitPendingLoad(controller); @@ -356,7 +356,7 @@ TEST_F(SearchTest, InstantNTPCustomNavigationEntry) { controller.SetTransientEntry( controller.CreateNavigationEntry(GURL("chrome://blank"), content::Referrer(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false, std::string(), contents->GetBrowserContext())); diff --git a/chrome/browser/search_engines/chrome_template_url_service_client.cc b/chrome/browser/search_engines/chrome_template_url_service_client.cc index 64cfeb4..a79f2fc 100644 --- a/chrome/browser/search_engines/chrome_template_url_service_client.cc +++ b/chrome/browser/search_engines/chrome_template_url_service_client.cc @@ -61,7 +61,7 @@ void ChromeTemplateURLServiceClient::AddKeywordGeneratedVisit(const GURL& url) { if (history_service) history_service->AddPage(url, base::Time::Now(), NULL, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_KEYWORD_GENERATED, + ui::PAGE_TRANSITION_KEYWORD_GENERATED, history::SOURCE_BROWSED, false); } @@ -90,7 +90,7 @@ void ChromeTemplateURLServiceClient::Observe( TemplateURLService::URLVisitedDetails visited_details; visited_details.url = history_details->row.url(); visited_details.is_keyword_transition = - content::PageTransitionStripQualifier(history_details->transition) == - content::PAGE_TRANSITION_KEYWORD; + ui::PageTransitionStripQualifier(history_details->transition) == + ui::PAGE_TRANSITION_KEYWORD; owner_->OnHistoryURLVisited(visited_details); } diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index 24f1274..8ef28b6 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -1123,7 +1123,7 @@ class SessionRestoreImpl : public content::NotificationObserver { if (i == 0) add_types |= TabStripModel::ADD_ACTIVE; chrome::NavigateParams params(browser, urls[i], - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; params.tabstrip_add_types = add_types; chrome::Navigate(¶ms); diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc index 5424bca..eed7405 100644 --- a/chrome/browser/sessions/session_restore_browsertest.cc +++ b/chrome/browser/sessions/session_restore_browsertest.cc @@ -43,10 +43,10 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/bindings_policy.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" #include "sync/protocol/session_specifics.pb.h" +#include "ui/base/page_transition_types.h" using sessions::SerializedNavigationEntry; using sessions::SerializedNavigationEntryTestHelper; @@ -144,7 +144,7 @@ class SessionRestoreTest : public InProcessBrowserTest { } else { chrome::NavigateParams params(profile, url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::Navigate(¶ms); } Browser* new_browser = window_observer.WaitForSingleNewBrowser(); @@ -401,7 +401,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), url2, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); observer.Wait(); } { @@ -409,7 +409,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreIndividualTabFromWindow) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), url3, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); observer.Wait(); } @@ -893,7 +893,7 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, ActiveIndexUpdatedAtInsert) { ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); chrome::NavigateParams navigate_params(browser(), url3_, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); navigate_params.tabstrip_index = 0; navigate_params.disposition = NEW_BACKGROUND_TAB; ui_test_utils::NavigateToURL(&navigate_params); diff --git a/chrome/browser/sessions/session_types.h b/chrome/browser/sessions/session_types.h index de140f1..35b4d29 100644 --- a/chrome/browser/sessions/session_types.h +++ b/chrome/browser/sessions/session_types.h @@ -14,7 +14,6 @@ #include "base/time/time.h" #include "components/sessions/serialized_navigation_entry.h" #include "components/sessions/session_id.h" -#include "content/public/common/page_transition_types.h" #include "sync/protocol/session_specifics.pb.h" #include "ui/base/ui_base_types.h" #include "ui/gfx/rect.h" diff --git a/chrome/browser/sessions/session_types_unittest.cc b/chrome/browser/sessions/session_types_unittest.cc index 45672f7..831ebbb 100644 --- a/chrome/browser/sessions/session_types_unittest.cc +++ b/chrome/browser/sessions/session_types_unittest.cc @@ -13,10 +13,10 @@ #include "base/time/time.h" #include "chrome/browser/search/search.h" #include "components/sessions/serialized_navigation_entry_test_helper.h" -#include "content/public/common/page_transition_types.h" #include "sync/protocol/session_specifics.pb.h" #include "sync/util/time.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" namespace { @@ -66,7 +66,7 @@ TEST(SessionTab, FromSyncData) { EXPECT_EQ(i, tab.navigations[i].index()); EXPECT_EQ(GURL("referrer"), tab.navigations[i].referrer().url); EXPECT_EQ(base::ASCIIToUTF16("title"),tab.navigations[i].title()); - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, tab.navigations[i].transition_type()); EXPECT_EQ(GURL("http://foo/" + base::IntToString(i)), tab.navigations[i].virtual_url()); diff --git a/chrome/browser/sessions/tab_restore_browsertest.cc b/chrome/browser/sessions/tab_restore_browsertest.cc index 30cf4e4..b0e55b6 100644 --- a/chrome/browser/sessions/tab_restore_browsertest.cc +++ b/chrome/browser/sessions/tab_restore_browsertest.cc @@ -432,7 +432,7 @@ IN_PROC_BROWSER_TEST_F(TabRestoreTest, RestoreWithExistingSiteInstance) { static_cast<content::WebContentsDelegate*>(browser())->OpenURLFromTab( tab, content::OpenURLParams(http_url2, content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); observer.Wait(); // Close the tab. diff --git a/chrome/browser/signin/signin_browsertest.cc b/chrome/browser/signin/signin_browsertest.cc index 623abdc..5354e4c 100644 --- a/chrome/browser/signin/signin_browsertest.cc +++ b/chrome/browser/signin/signin_browsertest.cc @@ -186,7 +186,7 @@ class BackOnNTPCommitObserver : public content::WebContentsObserver { virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE { + ui::PageTransition transition_type) OVERRIDE { if (url == GURL(chrome::kChromeUINewTabURL) || url == GURL(chrome::kChromeSearchLocalNtpUrl)) { content::WindowedNotificationObserver observer( @@ -225,7 +225,7 @@ IN_PROC_BROWSER_TEST_F(SigninBrowserTest, SigninSkipForNowAndGoBack) { // from the history. chrome::NavigateParams navigate_params(browser(), skip_url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); ui_test_utils::NavigateToURL(&navigate_params); // Register an observer that will navigate back immediately on the commit of diff --git a/chrome/browser/signin/signin_header_helper.cc b/chrome/browser/signin/signin_header_helper.cc index dd84375..2e479e2 100644 --- a/chrome/browser/signin/signin_header_helper.cc +++ b/chrome/browser/signin/signin_header_helper.cc @@ -155,7 +155,7 @@ void ProcessMirrorHeaderUIThread( if (service_type == signin::GAIA_SERVICE_TYPE_INCOGNITO) { web_contents->OpenURL(content::OpenURLParams( GURL(chrome::kChromeUINativeNewTabURL), content::Referrer(), - OFF_THE_RECORD, content::PAGE_TRANSITION_AUTO_TOPLEVEL, false)); + OFF_THE_RECORD, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false)); } else { AccountManagementScreenHelper::OpenAccountManagementScreen( Profile::FromBrowserContext(web_contents->GetBrowserContext()), @@ -258,7 +258,7 @@ void ProcessMirrorResponseHeaderIfExists( content::ResourceRequestInfo::ForRequest(request); if (!(info && info->IsMainFrame() && (info->HasUserGesture() || - !content::PageTransitionIsWebTriggerable(info->GetPageTransition())))) + !ui::PageTransitionIsWebTriggerable(info->GetPageTransition())))) return; std::string header_value; diff --git a/chrome/browser/signin/signin_ui_util.cc b/chrome/browser/signin/signin_ui_util.cc index 64a49c2..c122f28 100644 --- a/chrome/browser/signin/signin_ui_util.cc +++ b/chrome/browser/signin/signin_ui_util.cc @@ -171,7 +171,7 @@ void ShowSigninErrorLearnMorePage(Profile* profile) { static const char kSigninErrorLearnMoreUrl[] = "https://support.google.com/chrome/answer/1181420?"; chrome::NavigateParams params( - profile, GURL(kSigninErrorLearnMoreUrl), content::PAGE_TRANSITION_LINK); + profile, GURL(kSigninErrorLearnMoreUrl), ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index 3d78d5f..5e54d5b 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -676,7 +676,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestWSSInvalidCertAndClose) { WebContents* tabs[16]; for (int i = 0; i < 16; ++i) { tabs[i] = chrome::AddSelectedTabWithURL(browser(), slave_url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } chrome::SelectNextTab(browser()); @@ -830,7 +830,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestHTTPSErrorWithNoNavEntry) { GURL url = https_server_expired_.GetURL("files/ssl/google.htm"); WebContents* tab2 = chrome::AddSelectedTabWithURL( - browser(), url, content::PAGE_TRANSITION_TYPED); + browser(), url, ui::PAGE_TRANSITION_TYPED); content::WaitForLoadStop(tab2); // Verify our assumption that there was no prior navigation. @@ -865,7 +865,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestBadHTTPSDownload) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::NavigateParams navigate_params(browser(), url_dangerous, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); chrome::Navigate(&navigate_params); observer.Wait(); } @@ -1054,7 +1054,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestDisplaysInsecureContentTwoTabs) { &replacement_path)); GURL url = https_server_.GetURL(replacement_path); - chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_TYPED); params.disposition = NEW_FOREGROUND_TAB; params.tabstrip_index = 0; params.source_contents = tab1; @@ -1097,7 +1097,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestRunsInsecureContentTwoTabs) { // disposition won't usually stay in the same process, but this works // because we are using process-per-site in SetUpCommandLine. GURL url = https_server_.GetURL(replacement_path); - chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_TYPED); params.disposition = NEW_FOREGROUND_TAB; params.source_contents = tab1; content::WindowedNotificationObserver observer( @@ -1291,7 +1291,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestCloseTabWithUnsafePopup) { content::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Close the first tab. @@ -1855,7 +1855,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, InterstitialNotAffectedByHideShow) { AddTabAtIndex(0, https_server_.GetURL("files/ssl/google.html"), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); EXPECT_EQ(2, browser()->tab_strip_model()->count()); EXPECT_EQ(0, browser()->tab_strip_model()->active_index()); EXPECT_EQ(tab, browser()->tab_strip_model()->GetWebContentsAt(1)); diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc index 6a8c34f..a24949b 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc @@ -181,7 +181,7 @@ void SupervisedUserNavigationObserver::WarnInfoBarDismissed() { void SupervisedUserNavigationObserver::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { if (render_frame_host->GetParent()) return; @@ -229,7 +229,7 @@ void SupervisedUserNavigationObserver::OnRequestBlockedInternal( history::HistoryAddPageArgs add_page_args( url, timestamp, web_contents(), 0, url, history::RedirectList(), - content::PAGE_TRANSITION_BLOCKED, history::SOURCE_BROWSED, + ui::PAGE_TRANSITION_BLOCKED, history::SOURCE_BROWSED, false); // Add the entry to the history database. diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.h b/chrome/browser/supervised_user/supervised_user_navigation_observer.h index a78c19c..412e5a7 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_observer.h +++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.h @@ -54,7 +54,7 @@ class SupervisedUserNavigationObserver virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; void OnRequestBlockedInternal(const GURL& url); diff --git a/chrome/browser/supervised_user/supervised_user_resource_throttle_browsertest.cc b/chrome/browser/supervised_user/supervised_user_resource_throttle_browsertest.cc index d8d8a4a..ba101a8 100644 --- a/chrome/browser/supervised_user/supervised_user_resource_throttle_browsertest.cc +++ b/chrome/browser/supervised_user/supervised_user_resource_throttle_browsertest.cc @@ -66,7 +66,7 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserResourceThrottleTest, NavigationController& controller = web_contents->GetController(); content::TestNavigationObserver observer(web_contents.get()); controller.LoadURL(GURL("http://www.example.com"), content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); observer.Wait(); content::NavigationEntry* entry = controller.GetActiveEntry(); ASSERT_TRUE(entry); diff --git a/chrome/browser/sync/glue/session_sync_test_helper.cc b/chrome/browser/sync/glue/session_sync_test_helper.cc index d908288..9e241a9 100644 --- a/chrome/browser/sync/glue/session_sync_test_helper.cc +++ b/chrome/browser/sync/glue/session_sync_test_helper.cc @@ -86,7 +86,7 @@ void SessionSyncTestHelper::VerifySyncedSession( ASSERT_EQ(tab->navigations[0].title(), base::ASCIIToUTF16(kTitle)); ASSERT_EQ(tab->navigations[0].transition_type(), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } } } diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc index ae25e4f..90804d4 100644 --- a/chrome/browser/sync/glue/typed_url_change_processor.cc +++ b/chrome/browser/sync/glue/typed_url_change_processor.cc @@ -207,8 +207,8 @@ void TypedUrlChangeProcessor::HandleURLsVisited( bool TypedUrlChangeProcessor::ShouldSyncVisit( history::URLVisitedDetails* details) { int typed_count = details->row.typed_count(); - content::PageTransition transition = static_cast<content::PageTransition>( - details->transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = + ui::PageTransitionStripQualifier(details->transition); // Just use an ad-hoc criteria to determine whether to ignore this // notification. For most users, the distribution of visits is roughly a bell @@ -217,7 +217,7 @@ bool TypedUrlChangeProcessor::ShouldSyncVisit( // suggestions. But there are relatively few URLs with > 10 visits, and those // tend to be more broadly distributed such that there's no need to sync up // every visit to preserve their relative ordering. - return (transition == content::PAGE_TRANSITION_TYPED && + return (transition == ui::PAGE_TRANSITION_TYPED && typed_count > 0 && (typed_count < kTypedUrlVisitThrottleThreshold || (typed_count % kTypedUrlVisitThrottleMultiple) == 0)); diff --git a/chrome/browser/sync/glue/typed_url_model_associator.cc b/chrome/browser/sync/glue/typed_url_model_associator.cc index 30fc427..376c5ec 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator.cc @@ -103,7 +103,7 @@ bool TypedUrlModelAssociator::FixupURLAndGetVisits( } history::VisitRow visit( - url->id(), url->last_visit(), 0, content::PAGE_TRANSITION_TYPED, 0); + url->id(), url->last_visit(), 0, ui::PAGE_TRANSITION_TYPED, 0); visits->push_back(visit); } @@ -634,7 +634,7 @@ TypedUrlModelAssociator::MergeResult TypedUrlModelAssociator::MergeUrls( different |= DIFF_LOCAL_VISITS_ADDED; new_visits->push_back(history::VisitInfo( node_time, - content::PageTransitionFromInt( + ui::PageTransitionFromInt( node.visit_transitions(node_visit_index)))); } // This visit is added to visits below. @@ -704,13 +704,13 @@ void TypedUrlModelAssociator::WriteToTypedUrlSpecifics( // Walk the passed-in visit vector and count the # of typed visits. for (history::VisitVector::const_iterator visit = visits.begin(); visit != visits.end(); ++visit) { - content::PageTransition transition = content::PageTransitionFromInt( - visit->transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = + ui::PageTransitionStripQualifier(visit->transition); // We ignore reload visits. - if (transition == content::PAGE_TRANSITION_RELOAD) + if (transition == ui::PAGE_TRANSITION_RELOAD) continue; ++total; - if (transition == content::PAGE_TRANSITION_TYPED) + if (transition == ui::PAGE_TRANSITION_TYPED) ++typed_count; } // We should have at least one typed visit. This can sometimes happen if @@ -730,20 +730,20 @@ void TypedUrlModelAssociator::WriteToTypedUrlSpecifics( for (history::VisitVector::const_iterator visit = visits.begin(); visit != visits.end(); ++visit) { - content::PageTransition transition = content::PageTransitionFromInt( - visit->transition & content::PAGE_TRANSITION_CORE_MASK); + ui::PageTransition transition = + ui::PageTransitionStripQualifier(visit->transition); // Skip reload visits. - if (transition == content::PAGE_TRANSITION_RELOAD) + if (transition == ui::PAGE_TRANSITION_RELOAD) continue; // If we only have room for typed visits, then only add typed visits. - if (only_typed && transition != content::PAGE_TRANSITION_TYPED) + if (only_typed && transition != ui::PAGE_TRANSITION_TYPED) continue; if (skip_count > 0) { // We have too many entries to fit, so we need to skip the oldest ones. // Only skip typed URLs if there are too many typed URLs to fit. - if (only_typed || transition != content::PAGE_TRANSITION_TYPED) { + if (only_typed || transition != ui::PAGE_TRANSITION_TYPED) { --skip_count; continue; } @@ -760,7 +760,7 @@ void TypedUrlModelAssociator::WriteToTypedUrlSpecifics( // it's not legal to have an empty visit array (yet another workaround // for http://crbug.com/84258). typed_url->add_visits(url.last_visit().ToInternalValue()); - typed_url->add_visit_transitions(content::PAGE_TRANSITION_RELOAD); + typed_url->add_visit_transitions(ui::PAGE_TRANSITION_RELOAD); } CHECK_GT(typed_url->visits_size(), 0); CHECK_LE(typed_url->visits_size(), kMaxTypedUrlVisits); @@ -793,7 +793,7 @@ void TypedUrlModelAssociator::DiffVisits( } else if (old_visits[old_index].visit_time > new_visit_time) { new_visits->push_back(history::VisitInfo( new_visit_time, - content::PageTransitionFromInt( + ui::PageTransitionFromInt( new_url.visit_transitions(new_index)))); ++new_index; } else { @@ -811,7 +811,7 @@ void TypedUrlModelAssociator::DiffVisits( for ( ; new_index < new_visit_count; ++new_index) { new_visits->push_back(history::VisitInfo( base::Time::FromInternalValue(new_url.visits(new_index)), - content::PageTransitionFromInt(new_url.visit_transitions(new_index)))); + ui::PageTransitionFromInt(new_url.visit_transitions(new_index)))); } } diff --git a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc index 731b994..87c5742 100644 --- a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc +++ b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc @@ -39,7 +39,7 @@ class SyncTypedUrlModelAssociatorTest : public testing::Test { history_url.set_hidden(hidden); visits->push_back(history::VisitRow( history_url.id(), history_url.last_visit(), 0, - content::PAGE_TRANSITION_RELOAD, 0)); + ui::PAGE_TRANSITION_RELOAD, 0)); history_url.set_visit_count(visits->size()); return history_url; } @@ -53,7 +53,7 @@ class SyncTypedUrlModelAssociatorTest : public testing::Test { typed_url.set_title(title); typed_url.set_hidden(hidden); typed_url.add_visits(last_visit); - typed_url.add_visit_transitions(content::PAGE_TRANSITION_TYPED); + typed_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); return typed_url; } @@ -183,7 +183,7 @@ TEST_F(SyncTypedUrlModelAssociatorTest, MergeUrlsAfterExpiration) { // First, create a history row that has two visits, with timestamps 2 and 3. history::VisitVector(history_visits); history_visits.push_back(history::VisitRow( - 0, base::Time::FromInternalValue(2), 0, content::PAGE_TRANSITION_TYPED, + 0, base::Time::FromInternalValue(2), 0, ui::PAGE_TRANSITION_TYPED, 0)); history::URLRow history_url(MakeTypedUrlRow("http://pie.com/", "pie", 2, 3, false, &history_visits)); @@ -225,9 +225,9 @@ TEST_F(SyncTypedUrlModelAssociatorTest, DiffVisitsSame) { for (size_t c = 0; c < arraysize(visits); ++c) { old_visits.push_back(history::VisitRow( 0, base::Time::FromInternalValue(visits[c]), 0, - content::PAGE_TRANSITION_TYPED, 0)); + ui::PAGE_TRANSITION_TYPED, 0)); new_url.add_visits(visits[c]); - new_url.add_visit_transitions(content::PAGE_TRANSITION_TYPED); + new_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); } std::vector<history::VisitInfo> new_visits; @@ -255,12 +255,12 @@ TEST_F(SyncTypedUrlModelAssociatorTest, DiffVisitsRemove) { for (size_t c = 0; c < arraysize(visits_left); ++c) { old_visits.push_back(history::VisitRow( 0, base::Time::FromInternalValue(visits_left[c]), 0, - content::PAGE_TRANSITION_TYPED, 0)); + ui::PAGE_TRANSITION_TYPED, 0)); } for (size_t c = 0; c < arraysize(visits_right); ++c) { new_url.add_visits(visits_right[c]); - new_url.add_visit_transitions(content::PAGE_TRANSITION_TYPED); + new_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); } std::vector<history::VisitInfo> new_visits; @@ -289,12 +289,12 @@ TEST_F(SyncTypedUrlModelAssociatorTest, DiffVisitsAdd) { for (size_t c = 0; c < arraysize(visits_left); ++c) { old_visits.push_back(history::VisitRow( 0, base::Time::FromInternalValue(visits_left[c]), 0, - content::PAGE_TRANSITION_TYPED, 0)); + ui::PAGE_TRANSITION_TYPED, 0)); } for (size_t c = 0; c < arraysize(visits_right); ++c) { new_url.add_visits(visits_right[c]); - new_url.add_visit_transitions(content::PAGE_TRANSITION_TYPED); + new_url.add_visit_transitions(ui::PAGE_TRANSITION_TYPED); } std::vector<history::VisitInfo> new_visits; @@ -307,11 +307,11 @@ TEST_F(SyncTypedUrlModelAssociatorTest, DiffVisitsAdd) { for (size_t c = 0; c < arraysize(visits_added); ++c) { EXPECT_EQ(new_visits[c].first.ToInternalValue(), visits_added[c]); - EXPECT_EQ(new_visits[c].second, content::PAGE_TRANSITION_TYPED); + EXPECT_EQ(new_visits[c].second, ui::PAGE_TRANSITION_TYPED); } } -static history::VisitRow CreateVisit(content::PageTransition type, +static history::VisitRow CreateVisit(ui::PageTransition type, int64 timestamp) { return history::VisitRow(0, base::Time::FromInternalValue(timestamp), 0, type, 0); @@ -319,9 +319,9 @@ static history::VisitRow CreateVisit(content::PageTransition type, TEST_F(SyncTypedUrlModelAssociatorTest, WriteTypedUrlSpecifics) { history::VisitVector visits; - visits.push_back(CreateVisit(content::PAGE_TRANSITION_TYPED, 1)); - visits.push_back(CreateVisit(content::PAGE_TRANSITION_RELOAD, 2)); - visits.push_back(CreateVisit(content::PAGE_TRANSITION_LINK, 3)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_TYPED, 1)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_RELOAD, 2)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_LINK, 3)); history::URLRow url(MakeTypedUrlRow("http://pie.com/", "pie", 1, 100, false, &visits)); @@ -332,18 +332,18 @@ TEST_F(SyncTypedUrlModelAssociatorTest, WriteTypedUrlSpecifics) { EXPECT_EQ(typed_url.visit_transitions_size(), typed_url.visits_size()); EXPECT_EQ(1, typed_url.visits(0)); EXPECT_EQ(3, typed_url.visits(1)); - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - static_cast<content::PageTransition>(typed_url.visit_transitions(0))); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - static_cast<content::PageTransition>(typed_url.visit_transitions(1))); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionFromInt(typed_url.visit_transitions(0))); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionFromInt(typed_url.visit_transitions(1))); } TEST_F(SyncTypedUrlModelAssociatorTest, TooManyVisits) { history::VisitVector visits; int64 timestamp = 1000; - visits.push_back(CreateVisit(content::PAGE_TRANSITION_TYPED, timestamp++)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_TYPED, timestamp++)); for (int i = 0 ; i < 100; ++i) { - visits.push_back(CreateVisit(content::PAGE_TRANSITION_LINK, timestamp++)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_LINK, timestamp++)); } history::URLRow url(MakeTypedUrlRow("http://pie.com/", "pie", 1, timestamp++, false, &visits)); @@ -356,19 +356,19 @@ TEST_F(SyncTypedUrlModelAssociatorTest, TooManyVisits) { // Visit with timestamp of 1001 should be omitted since we should have // skipped that visit to stay under the cap. EXPECT_EQ(1002, typed_url.visits(1)); - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - static_cast<content::PageTransition>(typed_url.visit_transitions(0))); - EXPECT_EQ(content::PAGE_TRANSITION_LINK, - static_cast<content::PageTransition>(typed_url.visit_transitions(1))); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionFromInt(typed_url.visit_transitions(0))); + EXPECT_EQ(ui::PAGE_TRANSITION_LINK, + ui::PageTransitionFromInt(typed_url.visit_transitions(1))); } TEST_F(SyncTypedUrlModelAssociatorTest, TooManyTypedVisits) { history::VisitVector visits; int64 timestamp = 1000; for (int i = 0 ; i < 102; ++i) { - visits.push_back(CreateVisit(content::PAGE_TRANSITION_TYPED, timestamp++)); - visits.push_back(CreateVisit(content::PAGE_TRANSITION_LINK, timestamp++)); - visits.push_back(CreateVisit(content::PAGE_TRANSITION_RELOAD, timestamp++)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_TYPED, timestamp++)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_LINK, timestamp++)); + visits.push_back(CreateVisit(ui::PAGE_TRANSITION_RELOAD, timestamp++)); } history::URLRow url(MakeTypedUrlRow("http://pie.com/", "pie", 1, timestamp++, false, &visits)); @@ -382,8 +382,8 @@ TEST_F(SyncTypedUrlModelAssociatorTest, TooManyTypedVisits) { // Ensure there are no non-typed visits since that's all that should fit. for (int i = 0; i < typed_url.visits_size(); ++i) { - EXPECT_EQ(content::PAGE_TRANSITION_TYPED, - static_cast<content::PageTransition>(typed_url.visit_transitions(i))); + EXPECT_EQ(ui::PAGE_TRANSITION_TYPED, + ui::PageTransitionFromInt(typed_url.visit_transitions(i))); } } @@ -399,8 +399,8 @@ TEST_F(SyncTypedUrlModelAssociatorTest, NoTypedVisits) { EXPECT_EQ(typed_url.visit_transitions_size(), typed_url.visits_size()); // First two typed visits should be skipped. EXPECT_EQ(1000, typed_url.visits(0)); - EXPECT_EQ(content::PAGE_TRANSITION_RELOAD, - static_cast<content::PageTransition>(typed_url.visit_transitions(0))); + EXPECT_EQ(ui::PAGE_TRANSITION_RELOAD, + ui::PageTransitionFromInt(typed_url.visit_transitions(0))); } // This test verifies that we can abort model association from the UI thread. diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc index 1a2e241..2fe0476 100644 --- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc @@ -352,7 +352,7 @@ class ProfileSyncServiceTypedUrlTest : public AbstractProfileSyncServiceTest { history_url.set_hidden(hidden); visits->push_back(history::VisitRow( history_url.id(), history_url.last_visit(), 0, - content::PAGE_TRANSITION_TYPED, 0)); + ui::PAGE_TRANSITION_TYPED, 0)); history_url.set_visit_count(visits->size()); return history_url; } @@ -372,7 +372,7 @@ void AddTypedUrlEntries(ProfileSyncServiceTypedUrlTest* test, history::VisitVector visits; visits.push_back(history::VisitRow( entries[i].id(), entries[i].last_visit(), 0, - content::PageTransitionFromInt(0), 0)); + ui::PageTransitionFromInt(0), 0)); test->AddTypedUrlSyncNode(entries[i], visits); } } @@ -527,7 +527,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, HasNativeHasSyncMerge) { history::VisitVector merged_visits; merged_visits.push_back(history::VisitRow( sync_entry.id(), base::Time::FromInternalValue(15), 0, - content::PageTransitionFromInt(0), 0)); + ui::PageTransitionFromInt(0), 0)); history::URLRow merged_entry(MakeTypedUrlEntry("http://native.com", "name", 2, 17, false, &merged_visits)); @@ -704,7 +704,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeAddFromVisit) { history::URLVisitedDetails details; details.row = added_entry; - details.transition = content::PAGE_TRANSITION_TYPED; + details.transition = ui::PAGE_TRANSITION_TYPED; scoped_refptr<ThreadNotifier> notifier( new ThreadNotifier(history_thread_.get())); notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED, @@ -743,7 +743,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserChangeUpdateFromVisit) { history::URLVisitedDetails details; details.row = updated_entry; - details.transition = content::PAGE_TRANSITION_TYPED; + details.transition = ui::PAGE_TRANSITION_TYPED; scoped_refptr<ThreadNotifier> notifier( new ThreadNotifier(history_thread_.get())); notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED, @@ -784,7 +784,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) { details.row = updated_entry; // Should ignore this change because it's not TYPED. - details.transition = content::PAGE_TRANSITION_RELOAD; + details.transition = ui::PAGE_TRANSITION_RELOAD; scoped_refptr<ThreadNotifier> notifier( new ThreadNotifier(history_thread_.get())); notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED, @@ -803,7 +803,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) { 12, 15, false, &updated_visits)); details.row = twelve_visits; - details.transition = content::PAGE_TRANSITION_TYPED; + details.transition = ui::PAGE_TRANSITION_TYPED; notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED, content::Source<Profile>(profile_), content::Details<history::URLVisitedDetails>(&details)); @@ -818,7 +818,7 @@ TEST_F(ProfileSyncServiceTypedUrlTest, ProcessUserIgnoreChangeUpdateFromVisit) { 20, 15, false, &updated_visits)); details.row = twenty_visits; - details.transition = content::PAGE_TRANSITION_TYPED; + details.transition = ui::PAGE_TRANSITION_TYPED; notifier->Notify(chrome::NOTIFICATION_HISTORY_URL_VISITED, content::Source<Profile>(profile_), content::Details<history::URLVisitedDetails>(&details)); diff --git a/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc index bf86df5..5366f32 100644 --- a/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc +++ b/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc @@ -69,7 +69,7 @@ void SessionsSyncPerfTest::UpdateTabs(int profile) { content::Referrer(GURL("http://localhost"), blink::WebReferrerPolicyDefault), CURRENT_TAB, - content::PageTransitionFromInt(0), false)); + ui::PAGE_TRANSITION_LINK, false)); urls.push_back(url); } WaitForTabsToLoad(profile, urls); diff --git a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc index c754985..1aa615e 100644 --- a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc +++ b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc @@ -100,7 +100,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientTypedUrlsSyncTest, DeleteNonTyped) { GURL new_url(kSanityHistoryUrl); // Add a non-typed URL. - AddUrlToHistoryWithTransition(0, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTransition(0, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED); urls = GetTypedUrlsFromClient(0); diff --git a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc index b783a09..bdbf16b 100644 --- a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc @@ -100,7 +100,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, AddExpired) { base::Time timestamp = base::Time::Now() - base::TimeDelta::FromDays(365); AddUrlToHistoryWithTimestamp(0, new_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, timestamp); history::URLRows urls = GetTypedUrlsFromClient(0); @@ -132,7 +132,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, MAYBE_AddExpiredThenUpdate) { base::Time timestamp = base::Time::Now() - base::TimeDelta::FromDays(365); AddUrlToHistoryWithTimestamp(0, new_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, timestamp); std::vector<history::URLRow> urls = GetTypedUrlsFromClient(0); @@ -279,11 +279,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, // Then add a typed URL to the second client - this test makes sure that // we properly merge both sets of visits together to end up with the same // set of visits on both ends. - AddUrlToHistoryWithTimestamp(0, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTimestamp(0, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, timestamp); - AddUrlToHistoryWithTimestamp(1, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTimestamp(1, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, timestamp); - AddUrlToHistoryWithTimestamp(1, new_url, content::PAGE_TRANSITION_TYPED, + AddUrlToHistoryWithTimestamp(1, new_url, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, timestamp + base::TimeDelta::FromSeconds(1)); @@ -316,9 +316,9 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, // Setup both clients with the identical typed URL visit. This means we can't // use the verifier in this test, because this will show up as two distinct // visits in the verifier. - AddUrlToHistoryWithTimestamp(0, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTimestamp(0, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, timestamp); - AddUrlToHistoryWithTimestamp(1, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTimestamp(1, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, timestamp); // Now start up sync. Neither URL should get synced as they do not look like @@ -330,7 +330,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, ASSERT_EQ(0U, urls.size()); // Now, add a typed visit to the first client. - AddUrlToHistoryWithTimestamp(0, new_url, content::PAGE_TRANSITION_TYPED, + AddUrlToHistoryWithTimestamp(0, new_url, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, timestamp + base::TimeDelta::FromSeconds(1)); @@ -352,7 +352,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, UpdateToNonTypedURL) { // Populate one client with a non-typed URL, should not be synced. GURL new_url(kHistoryUrl); - AddUrlToHistoryWithTransition(0, new_url, content::PAGE_TRANSITION_LINK, + AddUrlToHistoryWithTransition(0, new_url, ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED); history::URLRows urls = GetTypedUrlsFromClient(0); ASSERT_EQ(0U, urls.size()); @@ -387,13 +387,13 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, // Create 3 items in our first client - 1 imported, one browsed, one with // both imported and browsed entries. AddUrlToHistoryWithTransition(0, imported_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_FIREFOX_IMPORTED); AddUrlToHistoryWithTransition(0, browsed_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED); AddUrlToHistoryWithTransition(0, browsed_and_imported_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_FIREFOX_IMPORTED); ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; @@ -405,7 +405,7 @@ IN_PROC_BROWSER_TEST_F(TwoClientTypedUrlsSyncTest, // Now browse to 3rd URL - this should cause it to be synced, even though it // was initially imported. AddUrlToHistoryWithTransition(0, browsed_and_imported_url, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED); ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); urls = GetTypedUrlsFromClient(1); diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.cc b/chrome/browser/sync/test/integration/typed_urls_helper.cc index 01f5b94..027a6fc 100644 --- a/chrome/browser/sync/test/integration/typed_urls_helper.cc +++ b/chrome/browser/sync/test/integration/typed_urls_helper.cc @@ -156,7 +156,7 @@ void WaitForHistoryDBThread(int index) { // type. void AddToHistory(HistoryService* service, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource source, const base::Time& timestamp) { service->AddPage(url, @@ -263,19 +263,19 @@ base::Time GetTimestamp() { } void AddUrlToHistory(int index, const GURL& url) { - AddUrlToHistoryWithTransition(index, url, content::PAGE_TRANSITION_TYPED, + AddUrlToHistoryWithTransition(index, url, ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED); } void AddUrlToHistoryWithTransition(int index, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource source) { base::Time timestamp = GetTimestamp(); AddUrlToHistoryWithTimestamp(index, url, transition, source, timestamp); } void AddUrlToHistoryWithTimestamp(int index, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource source, const base::Time& timestamp) { AddToHistory(HistoryServiceFactory::GetForProfileWithoutCreating( diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.h b/chrome/browser/sync/test/integration/typed_urls_helper.h index d057953..429b96c 100644 --- a/chrome/browser/sync/test/integration/typed_urls_helper.h +++ b/chrome/browser/sync/test/integration/typed_urls_helper.h @@ -8,7 +8,7 @@ #include <vector> #include "chrome/browser/history/history_types.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" namespace base { class Time; @@ -37,7 +37,7 @@ void AddUrlToHistory(int index, const GURL& url); // new visit if the URL already exists), using the passed PageTransition. void AddUrlToHistoryWithTransition(int index, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource source); // Adds a URL to the history DB for a specific sync profile (just registers a @@ -45,7 +45,7 @@ void AddUrlToHistoryWithTransition(int index, // timestamp. void AddUrlToHistoryWithTimestamp(int index, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, history::VisitSource source, const base::Time& timestamp); diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc index 5552771..700456e 100644 --- a/chrome/browser/task_manager/task_manager.cc +++ b/chrome/browser/task_manager/task_manager.cc @@ -1530,7 +1530,7 @@ void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { chrome::NavigateParams params( ProfileManager::GetLastUsedProfileAllowedByPolicy(), GURL(chrome::kChromeUIMemoryURL), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; params.host_desktop_type = desktop_type; chrome::Navigate(¶ms); diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc index 8100f86..217b5f2 100644 --- a/chrome/browser/task_manager/task_manager_browsertest.cc +++ b/chrome/browser/task_manager/task_manager_browsertest.cc @@ -36,7 +36,6 @@ #include "components/infobars/core/infobar.h" #include "content/public/browser/notification_service.h" #include "content/public/common/content_switches.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" @@ -44,6 +43,7 @@ #include "net/test/embedded_test_server/embedded_test_server.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" using content::WebContents; using task_manager::browsertest_util::MatchAboutBlankTab; @@ -130,7 +130,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeTabContentsChanges) { ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchTab("title1.html"))); // Open a new tab and make sure the task manager notices it. - AddTabAtIndex(0, GetTestURL(), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GetTestURL(), ui::PAGE_TRANSITION_TYPED); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("title1.html"))); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnyTab())); @@ -149,7 +149,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, KillTab) { ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(0, MatchTab("title1.html"))); // Open a new tab and make sure the task manager notices it. - AddTabAtIndex(0, GetTestURL(), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GetTestURL(), ui::PAGE_TRANSITION_TYPED); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchTab("title1.html"))); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnyTab())); @@ -380,7 +380,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionTabChanges) { // The fourth entry (page.html) is also of type extension and has both a // WebContents and an extension. The title should start with "Extension:". GURL url("chrome-extension://behllobkkfkfnphdnhnkndlbkcpglgmj/page.html"); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchExtension("Foobar"))); ASSERT_NO_FATAL_FAILURE( WaitForTaskManagerRows(1, MatchExtension("My extension 1"))); @@ -410,7 +410,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionTab) { .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj") .AppendASCII("1.0.0.0"))); GURL url("chrome-extension://behllobkkfkfnphdnhnkndlbkcpglgmj/page.html"); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); ShowTaskManager(); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(1, MatchExtension("Foobar"))); @@ -447,7 +447,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeAppTabChanges) { // Open a new tab to the app's launch URL and make sure we notice that. GURL url(extension->GetResourceURL("main.html")); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); // There should be 1 "App: " tab and the original new tab page. ASSERT_NO_FATAL_FAILURE( @@ -487,7 +487,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeAppTab) { // Open a new tab to the app's launch URL and make sure we notice that. GURL url(extension->GetResourceURL("main.html")); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); ShowTaskManager(); @@ -526,7 +526,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeHostedAppTabChanges) { content::WindowedNotificationObserver observer( content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Check that the new entry's title starts with "Tab:". @@ -591,7 +591,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeHostedAppTabAfterReload) { content::WindowedNotificationObserver observer( content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Load the hosted app and make sure it still starts with "Tab:", @@ -627,7 +627,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeHostedAppTabBeforeReload) { content::WindowedNotificationObserver observer( content::NOTIFICATION_NAV_ENTRY_COMMITTED, content::NotificationService::AllSources()); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Load the hosted app and make sure it still starts with "Tab:", @@ -676,7 +676,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, int resource_count = TaskManager::GetInstance()->model()->ResourceCount(); // Open a new tab and make sure we notice that. - AddTabAtIndex(0, GetTestURL(), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GetTestURL(), ui::PAGE_TRANSITION_TYPED); ASSERT_NO_FATAL_FAILURE(WaitForTaskManagerRows(2, MatchAnyTab())); // Check that we get some value for the cache columns. diff --git a/chrome/browser/translate/chrome_translate_client.cc b/chrome/browser/translate/chrome_translate_client.cc index 16b384e..9356f44 100644 --- a/chrome/browser/translate/chrome_translate_client.cc +++ b/chrome/browser/translate/chrome_translate_client.cc @@ -260,7 +260,7 @@ void ChromeTranslateClient::ShowReportLanguageDetectionErrorUI( } chrome::AddSelectedTabWithURL( - browser, report_url, content::PAGE_TRANSITION_AUTO_BOOKMARK); + browser, report_url, ui::PAGE_TRANSITION_AUTO_BOOKMARK); #endif // defined(OS_ANDROID) } diff --git a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc index 2566d76..135536c 100644 --- a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc +++ b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc @@ -839,9 +839,9 @@ TEST_F(TranslateManagerRenderViewHostTest, ReloadFromLocationBar) { // equivalent of typing the URL again in the location bar. NavEntryCommittedObserver nav_observer(web_contents()); web_contents()->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); rvh_tester()->SendNavigateWithTransition( - 0, url, content::PAGE_TRANSITION_TYPED); + 0, url, ui::PAGE_TRANSITION_TYPED); // Test that we are really getting a same page navigation, the test would be // useless if it was not the case. @@ -894,12 +894,12 @@ TEST_F(TranslateManagerRenderViewHostTest, CloseInfoBarInSubframeNavigation) { // Simulate a sub-frame auto-navigating. subframe_tester->SendNavigateWithTransition( - 1, GURL("http://pub.com"), content::PAGE_TRANSITION_AUTO_SUBFRAME); + 1, GURL("http://pub.com"), ui::PAGE_TRANSITION_AUTO_SUBFRAME); EXPECT_TRUE(GetTranslateInfoBar() == NULL); // Simulate the user navigating in a sub-frame. subframe_tester->SendNavigateWithTransition( - 2, GURL("http://pub.com"), content::PAGE_TRANSITION_MANUAL_SUBFRAME); + 2, GURL("http://pub.com"), ui::PAGE_TRANSITION_MANUAL_SUBFRAME); EXPECT_TRUE(GetTranslateInfoBar() == NULL); // Navigate out of page, a new infobar should show. diff --git a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc index fe94a79..0256d2a 100644 --- a/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc +++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate_android.cc @@ -98,7 +98,7 @@ void AutoLoginInfoBarDelegateAndroid::LoginSuccess(JNIEnv* env, // WARNING: |this| may be deleted at this point! Do not access any members! contents->OpenURL(content::OpenURLParams( GURL(base::android::ConvertJavaStringToUTF8(env, result)), - content::Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, + content::Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); } diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate.cc b/chrome/browser/ui/app_list/app_list_controller_delegate.cc index 205e0ec..83f94f7 100644 --- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc +++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc @@ -149,7 +149,7 @@ void AppListControllerDelegate::ShowAppInWebStore( net::AppendQueryParameter(url, extension_urls::kWebstoreSourceField, source), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::Navigate(¶ms); } @@ -171,7 +171,7 @@ void AppListControllerDelegate::ShowOptionsPage( chrome::NavigateParams params( profile, extensions::OptionsPageInfo::GetOptionsPage(extension), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc index d924ce6..af012b2 100644 --- a/chrome/browser/ui/app_list/app_list_view_delegate.cc +++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc @@ -492,7 +492,7 @@ void AppListViewDelegate::OpenHelp() { content::OpenURLParams params(GURL(chrome::kAppLauncherHelpURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); displayer.browser()->OpenURL(params); } diff --git a/chrome/browser/ui/app_list/search/people/people_result.cc b/chrome/browser/ui/app_list/search/people/people_result.cc index 3531f64..57ae19f 100644 --- a/chrome/browser/ui/app_list/search/people/people_result.cc +++ b/chrome/browser/ui/app_list/search/people/people_result.cc @@ -174,7 +174,7 @@ void PeopleResult::OpenChat() { void PeopleResult::SendEmail() { chrome::NavigateParams params(profile_, GURL(kEmailUrlPrefix + person_->email), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // If no window exists, this will open a new window this one tab. params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); diff --git a/chrome/browser/ui/app_list/search/search_webstore_result.cc b/chrome/browser/ui/app_list/search/search_webstore_result.cc index a979da6..fa5f1b5 100644 --- a/chrome/browser/ui/app_list/search/search_webstore_result.cc +++ b/chrome/browser/ui/app_list/search/search_webstore_result.cc @@ -49,7 +49,7 @@ void SearchWebstoreResult::Open(int event_flags) { chrome::NavigateParams params(profile_, store_url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = ui::DispositionFromEventFlags(event_flags); chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc index f99e436..6b3d25b 100644 --- a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc +++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc @@ -112,7 +112,7 @@ void WebstoreResult::Open(int event_flags) { chrome::NavigateParams params(profile_, store_url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = ui::DispositionFromEventFlags(event_flags); chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc index 8392be2..1f0bb9d 100644 --- a/chrome/browser/ui/app_list/start_page_service.cc +++ b/chrome/browser/ui/app_list/start_page_service.cc @@ -244,7 +244,7 @@ void StartPageService::LoadContents() { contents_->GetController().LoadURL( url, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc index dd7a47d..f616847 100644 --- a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc +++ b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc @@ -57,7 +57,7 @@ void ChromeNewWindowDelegateChromeos::OpenCrosh() { content::OpenURLParams(crosh_url, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_GENERATED, + ui::PAGE_TRANSITION_GENERATED, false)); browser->window()->Show(); browser->window()->Activate(); diff --git a/chrome/browser/ui/auto_login_infobar_delegate.cc b/chrome/browser/ui/auto_login_infobar_delegate.cc index b0d854d..18bc3fa 100644 --- a/chrome/browser/ui/auto_login_infobar_delegate.cc +++ b/chrome/browser/ui/auto_login_infobar_delegate.cc @@ -118,7 +118,7 @@ void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) { web_contents()->GetController().LoadURL( GaiaUrls::GetInstance()->merge_session_url().Resolve( "?source=chrome&uberauth=" + token + "&" + args_), - content::Referrer(), content::PAGE_TRANSITION_AUTO_BOOKMARK, + content::Referrer(), ui::PAGE_TRANSITION_AUTO_BOOKMARK, std::string()); } diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc index 2585987..4dba69f 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc @@ -52,7 +52,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/common/content_switches.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/referrer.h" #include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" @@ -62,6 +61,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/web/WebInputEvent.h" +#include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "url/gurl.h" @@ -1200,7 +1200,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, SimulateSuccessfulSignIn) { content::OpenURLParams params(wallet::GetSignInContinueUrl(), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, true); sign_in_contents->GetDelegate()->OpenURLFromTab(sign_in_contents, params); @@ -1277,7 +1277,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, AddAccount) { content::OpenURLParams params(wallet::GetSignInContinueUrl(), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, true); sign_in_contents->GetDelegate()->OpenURLFromTab(sign_in_contents, params); @@ -1421,7 +1421,7 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, content::OpenURLParams params(GURL("http://google.com"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, true); params.user_gesture = true; diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc index 1152179..7e0c35c 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc @@ -2913,7 +2913,7 @@ void AutofillDialogControllerImpl::OpenTabWithUrl(const GURL& url) { chrome::NavigateParams params( chrome::FindBrowserWithWebContents(web_contents()), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller.cc b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller.cc index 5eef3e9..dcfdba88 100644 --- a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller.cc +++ b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller.cc @@ -92,10 +92,10 @@ void GeneratedCreditCardBubbleController::DidNavigateMainFrame( // Don't destory the bubble due to reloads, form submits, or redirects right // after the dialog succeeds. Merchants often navigate to a confirmation page. - content::PageTransition transition = details.entry->GetTransitionType(); - if (transition == content::PAGE_TRANSITION_FORM_SUBMIT || - transition == content::PAGE_TRANSITION_RELOAD || - content::PageTransitionIsRedirect(transition)) { + ui::PageTransition transition = details.entry->GetTransitionType(); + if (transition == ui::PAGE_TRANSITION_FORM_SUBMIT || + transition == ui::PAGE_TRANSITION_RELOAD || + ui::PageTransitionIsRedirect(transition)) { return; } @@ -138,7 +138,7 @@ void GeneratedCreditCardBubbleController::OnLinkClicked() { chrome::NavigateParams params( chrome::FindBrowserWithWebContents(web_contents()), GURL(kWalletGeneratedCardLearnMoreLink), - content::PAGE_TRANSITION_AUTO_BOOKMARK); + ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); diff --git a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc index d52aff5..de08c51 100644 --- a/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc +++ b/chrome/browser/ui/autofill/generated_credit_card_bubble_controller_unittest.cc @@ -16,10 +16,10 @@ #include "chrome/test/base/testing_profile.h" #include "components/autofill/core/browser/autofill_test_utils.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/web_contents_tester.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" #include "ui/gfx/range/range.h" #if defined(OS_WIN) @@ -76,7 +76,7 @@ class GeneratedCreditCardBubbleControllerTest : public testing::Test { BackingCard()); } - void NavigateWithTransition(content::PageTransition trans) { + void NavigateWithTransition(ui::PageTransition trans) { content::WebContentsTester::For(test_web_contents_.get())->TestDidNavigate( test_web_contents_->GetMainFrame(), 1, GURL("about:blank"), trans); } @@ -156,7 +156,7 @@ TEST_F(GeneratedCreditCardBubbleControllerTest, HideOnLinkClick) { EXPECT_TRUE(controller()->GetTestingBubble()->showing()); // However, if the user clicks a link the bubble should hide. - NavigateWithTransition(content::PAGE_TRANSITION_LINK); + NavigateWithTransition(ui::PAGE_TRANSITION_LINK); EXPECT_FALSE(controller()); } @@ -167,9 +167,9 @@ TEST_F(GeneratedCreditCardBubbleControllerTest, StayOnSomeNavigations) { // If the user reloads or the page redirects or submits a form, the bubble // should stay showing. - NavigateWithTransition(content::PAGE_TRANSITION_CLIENT_REDIRECT); - NavigateWithTransition(content::PAGE_TRANSITION_FORM_SUBMIT); - NavigateWithTransition(content::PAGE_TRANSITION_RELOAD); + NavigateWithTransition(ui::PAGE_TRANSITION_CLIENT_REDIRECT); + NavigateWithTransition(ui::PAGE_TRANSITION_FORM_SUBMIT); + NavigateWithTransition(ui::PAGE_TRANSITION_RELOAD); EXPECT_TRUE(controller()->GetTestingBubble()->showing()); } diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc index 1f4ae7a..c2f7fc6 100644 --- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc +++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc @@ -217,7 +217,7 @@ void PasswordGenerationPopupControllerImpl::OnSavedPasswordsLinkClicked() { chrome::FindBrowserWithWebContents(controller_common_.web_contents()); content::OpenURLParams params( GURL(chrome::kPasswordManagerAccountDashboardURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false); browser->OpenURL(params); } diff --git a/chrome/browser/ui/blocked_content/blocked_window_params.cc b/chrome/browser/ui/blocked_content/blocked_window_params.cc index f3641a2..c26a42b 100644 --- a/chrome/browser/ui/blocked_content/blocked_window_params.cc +++ b/chrome/browser/ui/blocked_content/blocked_window_params.cc @@ -37,7 +37,7 @@ chrome::NavigateParams BlockedWindowParams::CreateNavigateParams( chrome::NavigateParams nav_params( Profile::FromBrowserContext(web_contents->GetBrowserContext()), popup_url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); nav_params.referrer = referrer_; nav_params.source_contents = web_contents; nav_params.is_renderer_initiated = true; diff --git a/chrome/browser/ui/bookmarks/bookmark_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_unittest.cc index 3e40038..0d150b7 100644 --- a/chrome/browser/ui/bookmarks/bookmark_unittest.cc +++ b/chrome/browser/ui/bookmarks/bookmark_unittest.cc @@ -27,7 +27,7 @@ TEST_F(BookmarkTest, DetachedBookmarkBarOnCustomNTP) { content::WebContents::CreateParams(browser()->profile())); web_contents->GetController().LoadURL(GURL(url::kAboutBlankURL), content::Referrer(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, std::string()); // Give it a NTP virtual URL. diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc index c2216ba..2c56d5e 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.cc +++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc @@ -221,7 +221,7 @@ void OpenAll(gfx::NativeWindow parent, content::WebContents* opened_tab = navigator->OpenURL( content::OpenURLParams(*url, content::Referrer(), disposition, - content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); if (!opened_first_url) { opened_first_url = true; diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 0525e02..e26600a 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -861,7 +861,7 @@ void Browser::UpdateDownloadShelfVisibility(bool visible) { /////////////////////////////////////////////////////////////////////////////// void Browser::UpdateUIForNavigationInTab(WebContents* contents, - content::PageTransition transition, + ui::PageTransition transition, bool user_initiated) { tab_strip_model_->TabNavigating(contents, transition); @@ -1836,7 +1836,7 @@ void Browser::NavigateOnThumbnailClick(const GURL& url, // TODO(kmadhusu): Page transitions to privileged destinations should be // marked as "LINK" instead of "AUTO_BOOKMARK"? chrome::NavigateParams params(this, url, - content::PAGE_TRANSITION_AUTO_BOOKMARK); + ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.referrer = content::Referrer(); params.source_contents = source_contents; params.disposition = disposition; @@ -1931,7 +1931,7 @@ void Browser::FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file_info, return; OpenURL(OpenURLParams( - url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); } /////////////////////////////////////////////////////////////////////////////// @@ -2478,7 +2478,7 @@ bool Browser::MaybeCreateBackgroundContents( contents->web_contents()->GetController().LoadURL( target_url, content::Referrer(), - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, std::string()); // No extra headers. } diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index 02e343c..4ae9ee6 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -37,8 +37,8 @@ #include "content/public/browser/notification_registrar.h" #include "content/public/browser/page_navigator.h" #include "content/public/browser/web_contents_delegate.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/page_zoom.h" +#include "ui/base/page_transition_types.h" #include "ui/base/ui_base_types.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/rect.h" @@ -393,7 +393,7 @@ class Browser : public TabStripModelObserver, // Called by chrome::Navigate() when a navigation has occurred in a tab in // this Browser. Updates the UI for the start of this navigation. void UpdateUIForNavigationInTab(content::WebContents* contents, - content::PageTransition transition, + ui::PageTransition transition, bool user_initiated); // Interface implementations //////////////////////////////////////////////// diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index f8fbb05..c86c59b 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -76,7 +76,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/frame_navigate_params.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/renderer_preferences.h" #include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" @@ -88,6 +87,7 @@ #include "net/dns/mock_host_resolver.h" #include "net/test/spawned_test_server/spawned_test_server.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" @@ -419,7 +419,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, JavascriptAlertActivatesTab) { GURL url(ui_test_utils::GetTestUrl(base::FilePath( base::FilePath::kCurrentDirectory), base::FilePath(kTitle1File))); ui_test_utils::NavigateToURL(browser(), url); - AddTabAtIndex(0, url, content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); EXPECT_EQ(2, browser()->tab_strip_model()->count()); EXPECT_EQ(0, browser()->tab_strip_model()->active_index()); WebContents* second_tab = browser()->tab_strip_model()->GetWebContentsAt(1); @@ -454,7 +454,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_ThirtyFourTabs) { const int kTabCount = 34; for (int ix = 0; ix != (kTabCount - 1); ++ix) { chrome::AddSelectedTabWithURL(browser(), url, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } EXPECT_EQ(kTabCount, browser()->tab_strip_model()->count()); @@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ClearPendingOnFailUnlessNTP) { content::Source<NavigationController>( &web_contents->GetController())); browser()->OpenURL(OpenURLParams(abort_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); stop_observer.Wait(); EXPECT_TRUE(web_contents->GetController().GetPendingEntry()); EXPECT_EQ(abort_url, web_contents->GetVisibleURL()); @@ -511,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ClearPendingOnFailUnlessNTP) { content::Source<NavigationController>( &web_contents->GetController())); browser()->OpenURL(OpenURLParams(abort_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); stop_observer.Wait(); EXPECT_FALSE(web_contents->GetController().GetPendingEntry()); EXPECT_EQ(real_url, web_contents->GetVisibleURL()); @@ -696,8 +696,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NoStopDuringTransferUntilCommit) { EXPECT_EQ(2U, redirect_observer.params().redirects.size()); EXPECT_EQ(redirect_url, redirect_observer.params().redirects.at(0)); EXPECT_EQ(dest_url, redirect_observer.params().redirects.at(1)); - EXPECT_TRUE(PageTransitionCoreTypeIs(redirect_observer.params().transition, - content::PAGE_TRANSITION_TYPED)); + EXPECT_TRUE(ui::PageTransitionCoreTypeIs( + redirect_observer.params().transition, ui::PAGE_TRANSITION_TYPED)); } // Restore previous browser client. @@ -733,7 +733,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, SingleBeforeUnloadAfterRedirect) { GURL redirect_url(test_server()->GetURL("server-redirect?" + https_url.spec())); browser()->OpenURL(OpenURLParams(redirect_url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); EXPECT_TRUE( static_cast<JavaScriptAppModalDialog*>(alert)->is_before_unload_dialog()); @@ -755,7 +755,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) { ASSERT_TRUE(test_server()->Start()); GURL url2(test_server()->GetURL("files/title1.html")); browser()->OpenURL(OpenURLParams( - url2, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url2, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); content::WindowedNotificationObserver host_destroyed_observer( content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, @@ -830,7 +830,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_BeforeUnloadVsBeforeReload) { // Navigate to another url, and check that we get a "before unload" dialog. GURL url2(url::kAboutBlankURL); browser()->OpenURL(OpenURLParams( - url2, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + url2, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); alert = ui_test_utils::WaitForAppModalDialog(); EXPECT_FALSE(static_cast<JavaScriptAppModalDialog*>(alert)->is_reload()); @@ -1184,7 +1184,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ConvertTabToAppShortcut) { ASSERT_EQ(1, browser()->tab_strip_model()->count()); WebContents* initial_tab = browser()->tab_strip_model()->GetWebContentsAt(0); WebContents* app_tab = chrome::AddSelectedTabWithURL( - browser(), http_url, content::PAGE_TRANSITION_TYPED); + browser(), http_url, ui::PAGE_TRANSITION_TYPED); ASSERT_EQ(2, browser()->tab_strip_model()->count()); ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), browser()->host_desktop_type())); @@ -1293,7 +1293,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_TabClosingWhenRemovingExtension) { extensions::TabHelper::FromWebContents(app_contents); extensions_tab_helper->SetExtensionApp(extension_app); - model->AddWebContents(app_contents, 0, content::PageTransitionFromInt(0), + model->AddWebContents(app_contents, 0, ui::PageTransitionFromInt(0), TabStripModel::ADD_NONE); model->SetTabPinned(0, true); ui_test_utils::NavigateToURL(browser(), url); @@ -1416,7 +1416,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, PageLanguageDetection) { // Open a new tab with a page in English. AddTabAtIndex(0, GURL(test_server()->GetURL("files/english_page.html")), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); WebContents* current_web_contents = browser()->tab_strip_model()->GetActiveWebContents(); @@ -1477,7 +1477,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RestorePinnedTabs) { extensions::TabHelper* extensions_tab_helper = extensions::TabHelper::FromWebContents(app_contents); extensions_tab_helper->SetExtensionApp(extension_app); - model->AddWebContents(app_contents, 0, content::PageTransitionFromInt(0), + model->AddWebContents(app_contents, 0, ui::PageTransitionFromInt(0), TabStripModel::ADD_NONE); model->SetTabPinned(0, true); ui_test_utils::NavigateToURL(browser(), url); @@ -2084,7 +2084,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest2, NoTabsInPopups) { EXPECT_EQ(1, popup_browser->tab_strip_model()->count()); // Now try opening another tab in the popup browser. - AddTabWithURLParams params1(url, content::PAGE_TRANSITION_TYPED); + AddTabWithURLParams params1(url, ui::PAGE_TRANSITION_TYPED); popup_browser->AddTabWithURL(¶ms1); EXPECT_EQ(popup_browser, params1.target); @@ -2102,7 +2102,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest2, NoTabsInPopups) { // Now try opening another tab in the app browser. AddTabWithURLParams params2(GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); app_browser->AddTabWithURL(¶ms2); EXPECT_EQ(app_browser, params2.target); @@ -2120,7 +2120,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest2, NoTabsInPopups) { // Now try opening another tab in the app popup browser. AddTabWithURLParams params3(GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); app_popup_browser->AddTabWithURL(¶ms3); EXPECT_EQ(app_popup_browser, params3.target); diff --git a/chrome/browser/ui/browser_close_browsertest.cc b/chrome/browser/ui/browser_close_browsertest.cc index 23fa01d..1ca7f1c 100644 --- a/chrome/browser/ui/browser_close_browsertest.cc +++ b/chrome/browser/ui/browser_close_browsertest.cc @@ -26,10 +26,10 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/download_item.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/download_test_observer.h" #include "content/test/net/url_request_slow_download_job.h" +#include "ui/base/page_transition_types.h" using content::BrowserContext; using content::BrowserThread; @@ -180,7 +180,7 @@ class BrowserCloseTest : public InProcessBrowserTest { new Browser(Browser::CreateParams(profile, host_desktop_type)); chrome::AddSelectedTabWithURL(new_browser, GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); content::WaitForLoadStop( new_browser->tab_strip_model()->GetActiveWebContents()); new_browser->window()->Show(); diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc index 071991c..43dd39e 100644 --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc @@ -213,7 +213,7 @@ WebContents* GetTabAndRevertIfNecessary(Browser* browser, case NEW_BACKGROUND_TAB: { WebContents* new_tab = current_tab->Clone(); browser->tab_strip_model()->AddWebContents( - new_tab, -1, content::PAGE_TRANSITION_LINK, + new_tab, -1, ui::PAGE_TRANSITION_LINK, (disposition == NEW_FOREGROUND_TAB) ? TabStripModel::ADD_ACTIVE : TabStripModel::ADD_NONE); return new_tab; @@ -223,7 +223,7 @@ WebContents* GetTabAndRevertIfNecessary(Browser* browser, Browser* new_browser = new Browser(Browser::CreateParams( browser->profile(), browser->host_desktop_type())); new_browser->tab_strip_model()->AddWebContents( - new_tab, -1, content::PAGE_TRANSITION_LINK, + new_tab, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); new_browser->window()->Show(); return new_tab; @@ -393,7 +393,7 @@ void OpenURLOffTheRecord(Profile* profile, ScopedTabbedBrowserDisplayer displayer(profile->GetOffTheRecordProfile(), desktop_type); AddSelectedTabWithURL(displayer.browser(), url, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } bool CanGoBack(const Browser* browser) { @@ -489,9 +489,9 @@ void Home(Browser* browser, WindowOpenDisposition disposition) { OpenURLParams params( url, Referrer(), disposition, - content::PageTransitionFromInt( - content::PAGE_TRANSITION_AUTO_BOOKMARK | - content::PAGE_TRANSITION_HOME_PAGE), + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_AUTO_BOOKMARK | + ui::PAGE_TRANSITION_HOME_PAGE), false); params.extra_headers = extra_headers; browser->OpenURL(params); @@ -505,9 +505,9 @@ void OpenCurrentURL(Browser* browser) { GURL url(location_bar->GetDestinationURL()); - content::PageTransition page_transition = location_bar->GetPageTransition(); - content::PageTransition page_transition_without_qualifier( - PageTransitionStripQualifier(page_transition)); + ui::PageTransition page_transition = location_bar->GetPageTransition(); + ui::PageTransition page_transition_without_qualifier( + ui::PageTransitionStripQualifier(page_transition)); WindowOpenDisposition open_disposition = location_bar->GetWindowOpenDisposition(); // A PAGE_TRANSITION_TYPED means the user has typed a URL. We do not want to @@ -517,8 +517,8 @@ void OpenCurrentURL(Browser* browser) { // Instant should also not handle PAGE_TRANSITION_RELOAD because its knowledge // of the omnibox text may be stale if the user focuses in the omnibox and // presses enter without typing anything. - if (page_transition_without_qualifier != content::PAGE_TRANSITION_TYPED && - page_transition_without_qualifier != content::PAGE_TRANSITION_RELOAD && + if (page_transition_without_qualifier != ui::PAGE_TRANSITION_TYPED && + page_transition_without_qualifier != ui::PAGE_TRANSITION_RELOAD && browser->instant_controller() && browser->instant_controller()->OpenInstant(open_disposition, url)) return; @@ -709,7 +709,7 @@ WebContents* DuplicateTabAt(Browser* browser, int index) { // The page transition below is only for the purpose of inserting the tab. new_browser->tab_strip_model()->AddWebContents( contents_dupe, -1, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); } @@ -1216,7 +1216,7 @@ void ViewSource(Browser* browser, // The page transition below is only for the purpose of inserting the tab. b->tab_strip_model()->AddWebContents(view_source_contents, -1, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); } diff --git a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc index bf05822..1870fb1 100644 --- a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc +++ b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc @@ -37,7 +37,7 @@ void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage( // blocking, so bounce to an explanatory page for now. chrome::AddSelectedTabWithURL(browser_, GURL(kInsecureScriptHelpUrl), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); return; case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage); @@ -54,5 +54,5 @@ void BrowserContentSettingBubbleModelDelegate::ShowLearnMorePage( return; chrome::AddSelectedTabWithURL(browser_, GURL(chrome::kBlockedPluginLearnMoreURL), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc index 3c890f3..3b81b33 100644 --- a/chrome/browser/ui/browser_focus_uitest.cc +++ b/chrome/browser/ui/browser_focus_uitest.cc @@ -248,7 +248,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) { // Create several tabs. for (int i = 0; i < 4; ++i) { chrome::AddSelectedTabWithURL(browser(), url, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); } // Alternate focus for the tab. @@ -321,7 +321,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_TabsRememberFocusFindInPage) { chrome::FocusLocationBar(browser()); // Create a 2nd tab. - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); // Focus should be on the recently opened tab page. ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); @@ -525,7 +525,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabInitialFocus) { // Open about:blank, focus should be on the location bar. chrome::AddSelectedTabWithURL( - browser(), GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_LINK); + browser(), GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_LINK); ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop( browser()->tab_strip_model()->GetActiveWebContents())); EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX)); @@ -626,7 +626,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, NavigateFromOmniboxIntoNewTab) { GURL url2("http://maps.google.com/"); // Navigate to url. - chrome::NavigateParams p(browser(), url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams p(browser(), url, ui::PAGE_TRANSITION_LINK); p.window_action = chrome::NavigateParams::SHOW_WINDOW; p.disposition = CURRENT_TAB; chrome::Navigate(&p); @@ -639,7 +639,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, NavigateFromOmniboxIntoNewTab) { // Simulate an alt-enter. controller->OnAutocompleteAccept(url2, NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); // Make sure the second tab is selected. EXPECT_EQ(1, browser()->tab_strip_model()->active_index()); diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index 6b7c43a..fe927a6 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -398,7 +398,7 @@ namespace chrome { NavigateParams::NavigateParams(Browser* a_browser, const GURL& a_url, - content::PageTransition a_transition) + ui::PageTransition a_transition) : url(a_url), frame_tree_node_id(-1), uses_post(false), @@ -429,7 +429,7 @@ NavigateParams::NavigateParams(Browser* a_browser, source_contents(NULL), disposition(CURRENT_TAB), trusted_source(false), - transition(content::PAGE_TRANSITION_LINK), + transition(ui::PAGE_TRANSITION_LINK), is_renderer_initiated(false), tabstrip_index(-1), tabstrip_add_types(TabStripModel::ADD_ACTIVE), @@ -446,7 +446,7 @@ NavigateParams::NavigateParams(Browser* a_browser, NavigateParams::NavigateParams(Profile* a_profile, const GURL& a_url, - content::PageTransition a_transition) + ui::PageTransition a_transition) : url(a_url), frame_tree_node_id(-1), uses_post(false), @@ -577,16 +577,16 @@ void Navigate(NavigateParams* params) { // Determine if the navigation was user initiated. If it was, we need to // inform the target WebContents, and we may need to update the UI. - content::PageTransition base_transition = - content::PageTransitionStripQualifier(params->transition); + ui::PageTransition base_transition = + ui::PageTransitionStripQualifier(params->transition); bool user_initiated = - params->transition & content::PAGE_TRANSITION_FROM_ADDRESS_BAR || - base_transition == content::PAGE_TRANSITION_TYPED || - base_transition == content::PAGE_TRANSITION_AUTO_BOOKMARK || - base_transition == content::PAGE_TRANSITION_GENERATED || - base_transition == content::PAGE_TRANSITION_AUTO_TOPLEVEL || - base_transition == content::PAGE_TRANSITION_RELOAD || - base_transition == content::PAGE_TRANSITION_KEYWORD; + params->transition & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR || + base_transition == ui::PAGE_TRANSITION_TYPED || + base_transition == ui::PAGE_TRANSITION_AUTO_BOOKMARK || + base_transition == ui::PAGE_TRANSITION_GENERATED || + base_transition == ui::PAGE_TRANSITION_AUTO_TOPLEVEL || + base_transition == ui::PAGE_TRANSITION_RELOAD || + base_transition == ui::PAGE_TRANSITION_KEYWORD; // Check if this is a singleton tab that already exists int singleton_index = chrome::GetIndexOfSingletonTab(params); diff --git a/chrome/browser/ui/browser_navigator.h b/chrome/browser/ui/browser_navigator.h index 5cb200f..4209927 100644 --- a/chrome/browser/ui/browser_navigator.h +++ b/chrome/browser/ui/browser_navigator.h @@ -13,8 +13,8 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/global_request_id.h" #include "content/public/browser/page_navigator.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/referrer.h" +#include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/rect.h" #include "url/gurl.h" @@ -34,12 +34,12 @@ namespace chrome { // // Simple Navigate to URL in current tab: // chrome::NavigateParams params(browser, GURL("http://www.google.com/"), -// content::PAGE_TRANSITION_LINK); +// ui::PAGE_TRANSITION_LINK); // chrome::Navigate(¶ms); // // Open bookmark in new background tab: // chrome::NavigateParams params(browser, url, -// content::PAGE_TRANSITION_AUTO_BOOKMARK); +// ui::PAGE_TRANSITION_AUTO_BOOKMARK); // params.disposition = NEW_BACKGROUND_TAB; // chrome::Navigate(¶ms); // @@ -53,12 +53,12 @@ namespace chrome { struct NavigateParams { NavigateParams(Browser* browser, const GURL& a_url, - content::PageTransition a_transition); + ui::PageTransition a_transition); NavigateParams(Browser* browser, content::WebContents* a_target_contents); NavigateParams(Profile* profile, const GURL& a_url, - content::PageTransition a_transition); + ui::PageTransition a_transition); ~NavigateParams(); // The URL/referrer to be loaded. Ignored if |target_contents| is non-NULL. @@ -129,9 +129,9 @@ struct NavigateParams { bool trusted_source; // The transition type of the navigation. Default is - // content::PAGE_TRANSITION_LINK when target_contents is specified in the + // ui::PAGE_TRANSITION_LINK when target_contents is specified in the // constructor. - content::PageTransition transition; + ui::PageTransition transition; // Whether this navigation was initiated by the renderer process. Default is // false. diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc index 037bf35..ac37ac9 100644 --- a/chrome/browser/ui/browser_navigator_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_browsertest.cc @@ -74,7 +74,7 @@ chrome::NavigateParams BrowserNavigatorTest::MakeNavigateParams() const { chrome::NavigateParams BrowserNavigatorTest::MakeNavigateParams( Browser* browser) const { chrome::NavigateParams params(browser, GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.window_action = chrome::NavigateParams::SHOW_WINDOW; return params; } @@ -248,9 +248,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting) { content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), singleton_url1, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 3 tabs, the 3rd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -281,7 +281,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, GURL singleton_ref_url3("http://maps.google.com/"); chrome::AddSelectedTabWithURL(browser(), singleton_ref_url1, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 2 tabs, 2nd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -779,7 +779,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Tabstrip_InsertAtIndex) { IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabNew_IgnorePath) { chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 2 tabs, the 2nd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -811,9 +811,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExisting_IgnorePath) { GURL singleton_url1(GetSettingsURL()); chrome::AddSelectedTabWithURL(browser(), singleton_url1, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 3 tabs, the 3rd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -845,9 +845,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExistingSubPath_IgnorePath) { GURL singleton_url1(GetContentSettingsURL()); chrome::AddSelectedTabWithURL(browser(), singleton_url1, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 3 tabs, the 3rd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -879,9 +879,9 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabExistingSubPath_IgnorePath2) { GURL singleton_url1(GetContentSettingsURL()); chrome::AddSelectedTabWithURL(browser(), singleton_url1, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 3 tabs, the 3rd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -912,7 +912,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_SingletonTabFocused_IgnorePath) { GURL singleton_url_current(GetContentSettingsURL()); chrome::AddSelectedTabWithURL(browser(), singleton_url_current, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); // We should have one browser with 2 tabs, the 2nd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -945,7 +945,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, int initial_tab_count = browser()->tab_strip_model()->count(); GURL singleton_url_current("chrome://settings/internet"); chrome::AddSelectedTabWithURL(browser(), singleton_url_current, - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); EXPECT_EQ(initial_tab_count + 1, browser()->tab_strip_model()->count()); EXPECT_EQ(initial_tab_count, browser()->tab_strip_model()->active_index()); @@ -1003,7 +1003,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_Disposition_Settings_UseNonIncognitoWindowForBookmark) { chrome::NavigateParams params(browser(), GetSettingsURL(), - content::PAGE_TRANSITION_AUTO_BOOKMARK); + ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.disposition = OFF_THE_RECORD; { content::WindowedNotificationObserver observer( @@ -1051,7 +1051,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, DISABLED_NavigateToCrashedSingletonTab) { GURL singleton_url(GetContentSettingsURL()); WebContents* web_contents = chrome::AddSelectedTabWithURL( - browser(), singleton_url, content::PAGE_TRANSITION_LINK); + browser(), singleton_url, ui::PAGE_TRANSITION_LINK); // We should have one browser with 2 tabs, the 2nd selected. EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -1220,7 +1220,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); observer.Wait(); } @@ -1239,7 +1239,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, CloseSingletonTab) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser(), GetGoogleURL(), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); observer.Wait(); } @@ -1314,7 +1314,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, // First navigate using the profile of the existing browser window, and // check that the window is reused. chrome::NavigateParams params(browser()->profile(), GetGoogleURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); ui_test_utils::NavigateToURL(¶ms); EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); @@ -1322,7 +1322,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, // is created. chrome::NavigateParams params_incognito( browser()->profile()->GetOffTheRecordProfile(), - GetGoogleURL(), content::PAGE_TRANSITION_LINK); + GetGoogleURL(), ui::PAGE_TRANSITION_LINK); ui_test_utils::NavigateToURL(¶ms_incognito); EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); } @@ -1334,12 +1334,12 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ViewSourceIsntSingleton) { chrome::NavigateParams viewsource_params(browser(), GURL(viewsource_ntp_url), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); ui_test_utils::NavigateToURL(&viewsource_params); chrome::NavigateParams singleton_params(browser(), GURL(chrome::kChromeUIVersionURL), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); singleton_params.disposition = SINGLETON_TAB; EXPECT_EQ(-1, chrome::GetIndexOfSingletonTab(&singleton_params)); } diff --git a/chrome/browser/ui/browser_tab_strip_model_delegate.cc b/chrome/browser/ui/browser_tab_strip_model_delegate.cc index ff7b0b7..58e5999 100644 --- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc +++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc @@ -23,7 +23,6 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" -#include "content/public/common/page_transition_types.h" #include "ipc/ipc_message.h" namespace chrome { diff --git a/chrome/browser/ui/browser_tabstrip.cc b/chrome/browser/ui/browser_tabstrip.cc index 1018bbd..b307c93 100644 --- a/chrome/browser/ui/browser_tabstrip.cc +++ b/chrome/browser/ui/browser_tabstrip.cc @@ -25,7 +25,7 @@ void AddTabAt(Browser* browser, const GURL& url, int idx, bool foreground) { base::TimeTicks new_tab_start_time = base::TimeTicks::Now(); chrome::NavigateParams params(browser, url.is_empty() ? GURL(chrome::kChromeUINewTabURL) : url, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); params.disposition = foreground ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; params.tabstrip_index = idx; chrome::Navigate(¶ms); @@ -37,7 +37,7 @@ void AddTabAt(Browser* browser, const GURL& url, int idx, bool foreground) { content::WebContents* AddSelectedTabWithURL( Browser* browser, const GURL& url, - content::PageTransition transition) { + ui::PageTransition transition) { NavigateParams params(browser, url, transition); params.disposition = NEW_FOREGROUND_TAB; Navigate(¶ms); diff --git a/chrome/browser/ui/browser_tabstrip.h b/chrome/browser/ui/browser_tabstrip.h index 6d1055c..6a21c28 100644 --- a/chrome/browser/ui/browser_tabstrip.h +++ b/chrome/browser/ui/browser_tabstrip.h @@ -7,7 +7,7 @@ #include "content/public/browser/navigation_controller.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" class Browser; @@ -33,7 +33,7 @@ void AddTabAt(Browser* browser, const GURL& url, int index, bool foreground); // created WebContents. content::WebContents* AddSelectedTabWithURL(Browser* browser, const GURL& url, - content::PageTransition transition); + ui::PageTransition transition); // Creates a new tab with the already-created WebContents 'new_contents'. // The window for the added contents will be reparented correctly when this diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm index 3dec7e5..6f958194 100644 --- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm +++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm @@ -147,7 +147,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id, url, content::Referrer(previousURL, blink::WebReferrerPolicyDefault), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); } @@ -267,7 +267,7 @@ void ResumeAppleEventAndSendReply(NSAppleEventManagerSuspensionID suspension_id, entry->GetURL().spec()), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } } diff --git a/chrome/browser/ui/cocoa/applescript/window_applescript.mm b/chrome/browser/ui/cocoa/applescript/window_applescript.mm index ba9325207..e86db50 100644 --- a/chrome/browser/ui/cocoa/applescript/window_applescript.mm +++ b/chrome/browser/ui/cocoa/applescript/window_applescript.mm @@ -179,7 +179,7 @@ content::WebContents* contents = chrome::AddSelectedTabWithURL( browser_, GURL(chrome::kChromeUINewTabURL), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(contents); core_tab_helper->set_new_tab_start_time(newTabStartTime); [aTab setWebContents:contents]; @@ -194,7 +194,7 @@ // Set how long it takes a tab to be created. base::TimeTicks newTabStartTime = base::TimeTicks::Now(); chrome::NavigateParams params(browser_, GURL(chrome::kChromeUINewTabURL), - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); params.disposition = NEW_FOREGROUND_TAB; params.tabstrip_index = index; chrome::Navigate(¶ms); diff --git a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm index 7293c4b..c06182c 100644 --- a/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm +++ b/chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm @@ -101,7 +101,7 @@ void CocoaSignInDelegate::HandleKeyboardEvent( webContents_->GetController().LoadURL( dialog_->delegate()->SignInUrl(), content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm index 685c00b..a9120c6 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm @@ -949,7 +949,7 @@ void RecordAppLaunch(Profile* profile, GURL url) { // override. - (void)openURL:(GURL)url disposition:(WindowOpenDisposition)disposition { OpenURLParams params( - url, Referrer(), disposition, content::PAGE_TRANSITION_AUTO_BOOKMARK, + url, Referrer(), disposition, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false); browser_->OpenURL(params); } diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm index 7683d71..00f6447 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm @@ -98,7 +98,7 @@ const NSUInteger kMaximumMenuPixelsWide = 300; ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); OpenURLParams params( node->url(), Referrer(), disposition, - content::PAGE_TRANSITION_AUTO_BOOKMARK, false); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false); browser->OpenURL(params); } diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 0c6387d..2230fc6 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -1916,7 +1916,7 @@ using content::WebContents; if (webContents) { OpenURLParams params( GURL(chrome::kCrashReasonURL), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); webContents->OpenURL(params); } } diff --git a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm index 021c33e..9628ced 100644 --- a/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm +++ b/chrome/browser/ui/cocoa/constrained_window/constrained_window_mac_browsertest.mm @@ -48,7 +48,7 @@ class ConstrainedWindowMacTest : public InProcessBrowserTest { } virtual void SetUpOnMainThread() OVERRIDE { - AddTabAtIndex(1, GURL("about:blank"), content::PAGE_TRANSITION_LINK); + AddTabAtIndex(1, GURL("about:blank"), ui::PAGE_TRANSITION_LINK); tab0_ = browser()->tab_strip_model()->GetWebContentsAt(0); tab1_ = browser()->tab_strip_model()->GetWebContentsAt(1); EXPECT_EQ(tab1_, browser()->tab_strip_model()->GetActiveWebContents()); diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_controller.mm index f6b70b3..f540d86 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_controller.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu_controller.mm @@ -184,7 +184,7 @@ class AsyncUninstaller : public extensions::ExtensionUninstallDialog::Delegate { OpenURLParams params(url, Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); browser_->OpenURL(params); } diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm index d8ef9aa..90cac17 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm @@ -211,7 +211,7 @@ bool HasAttribute(id item, CellAttributesMask attributeMask) { GURL store_url(extension_urls::GetWebstoreItemDetailURLPrefix() + prompt_->extension()->id()); navigator_->OpenURL(OpenURLParams( - store_url, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, + store_url, Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); delegate_->InstallUIAbort(/*user_initiated=*/true); diff --git a/chrome/browser/ui/cocoa/find_bar/find_bar_browsertest.mm b/chrome/browser/ui/cocoa/find_bar/find_bar_browsertest.mm index 9ea5b0e..4a6042f 100644 --- a/chrome/browser/ui/cocoa/find_bar/find_bar_browsertest.mm +++ b/chrome/browser/ui/cocoa/find_bar/find_bar_browsertest.mm @@ -25,7 +25,7 @@ bool FindBarHasFocus(Browser* browser) { typedef InProcessBrowserTest FindBarBrowserTest; IN_PROC_BROWSER_TEST_F(FindBarBrowserTest, FocusOnTabSwitch) { - AddTabAtIndex(1, GURL("about:blank"), content::PAGE_TRANSITION_LINK); + AddTabAtIndex(1, GURL("about:blank"), ui::PAGE_TRANSITION_LINK); browser()->GetFindBarController()->Show(); // Verify that if the find bar has focus then switching tabs and changing diff --git a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm index 33e8e1d..e2adc9a 100644 --- a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm +++ b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm @@ -56,7 +56,7 @@ using content::Referrer; WindowOpenDisposition disposition = ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); chrome::NavigateParams params(bridge_->profile(), node->url, - content::PAGE_TRANSITION_AUTO_BOOKMARK); + ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.disposition = disposition; chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h index 6948bd6..87a7347 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h @@ -59,7 +59,7 @@ class LocationBarViewMac : public LocationBar, virtual void ShowFirstRunBubble() OVERRIDE; virtual GURL GetDestinationURL() const OVERRIDE; virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; - virtual content::PageTransition GetPageTransition() const OVERRIDE; + virtual ui::PageTransition GetPageTransition() const OVERRIDE; virtual void AcceptInput() OVERRIDE; virtual void FocusLocation(bool select_all) OVERRIDE; virtual void FocusSearch() OVERRIDE; diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm index 2ced6d7..ce60ce6 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm @@ -183,7 +183,7 @@ WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const { return disposition(); } -content::PageTransition LocationBarViewMac::GetPageTransition() const { +ui::PageTransition LocationBarViewMac::GetPageTransition() const { return transition(); } diff --git a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm index e6490ac..cfc85e1 100644 --- a/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm +++ b/chrome/browser/ui/cocoa/one_click_signin_view_controller.mm @@ -115,7 +115,7 @@ void ShiftOriginY(NSView* view, CGFloat amount) { else { content::OpenURLParams params(GURL(chrome::kChromeUISettingsURL), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); webContents_->OpenURL(params); } [self close]; @@ -292,7 +292,7 @@ void ShiftOriginY(NSView* view, CGFloat amount) { NEW_WINDOW : NEW_FOREGROUND_TAB; content::OpenURLParams params(GURL(chrome::kChromeSyncLearnMoreURL), content::Referrer(), location, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); webContents_->OpenURL(params); return YES; } diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_browsertest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_browsertest.mm index 957afab..b01298e 100644 --- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_browsertest.mm +++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_browsertest.mm @@ -107,7 +107,7 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleTest, TabChangeTogglesIcon) { // Open a new tab. int firstTab = browser()->tab_strip_model()->active_index(); AddTabAtIndex( - firstTab + 1, GURL("http://foo.bar/"), content::PAGE_TRANSITION_TYPED); + firstTab + 1, GURL("http://foo.bar/"), ui::PAGE_TRANSITION_TYPED); EXPECT_FALSE(decoration()->IsVisible()); // Switch back to the previous tab. diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm index b90c224..9771594 100644 --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm @@ -1883,7 +1883,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, content::WebContents::CreateParams(browser_->profile()))); webContents_->GetController().LoadURL(url, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); NSView* webview = webContents_->GetNativeView(); [webview setFrameSize:NSMakeSize(kFixedGaiaViewWidth, kFixedGaiaViewHeight)]; diff --git a/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm index 4b550c6..7413fec 100644 --- a/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm @@ -396,7 +396,7 @@ NSTextField* AddTextField( - (void)learnMore { chrome::NavigateParams params( browser_, GURL(chrome::kChromeEnterpriseSignInLearnMoreURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = NEW_POPUP; params.window_action = chrome::NavigateParams::SHOW_WINDOW; chrome::Navigate(¶ms); diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm index 6762cd4..678881e 100644 --- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm +++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm @@ -140,7 +140,7 @@ class UserManagerWebContentsDelegate : public content::WebContentsDelegate { - (void)showURL:(const GURL&)url { webContents_->GetController().LoadURL(url, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); [self show]; } diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm index 20e3aca..2cf76db 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm @@ -2064,7 +2064,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) { case NEW_FOREGROUND_TAB: { content::RecordAction(UserMetricsAction("Tab_DropURLBetweenTabs")); chrome::NavigateParams params(browser_, *url, - content::PAGE_TRANSITION_TYPED); + ui::PAGE_TRANSITION_TYPED); params.disposition = disposition; params.tabstrip_index = index; params.tabstrip_add_types = @@ -2075,7 +2075,7 @@ NSImage* Overlay(NSImage* ground, NSImage* overlay, CGFloat alpha) { case CURRENT_TAB: { content::RecordAction(UserMetricsAction("Tab_DropURLOnTab")); OpenURLParams params( - *url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); + *url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); tabStripModel_->GetWebContentsAt(index)->OpenURL(params); tabStripModel_->ActivateTabAt(index, true); break; diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm index d9252ac..a7de9f2 100644 --- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm +++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm @@ -795,7 +795,7 @@ class NotificationBridge : public WrenchMenuBadgeController::Delegate { OmniboxView::StripJavascriptSchemas(base::UTF8ToUTF16(url.spec()))); } OpenURLParams params( - url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); + url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params); } @@ -813,7 +813,7 @@ class NotificationBridge : public WrenchMenuBadgeController::Delegate { GURL url(match.destination_url); OpenURLParams params( - url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false); + url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false); browser_->tab_strip_model()->GetActiveWebContents()->OpenURL(params); } diff --git a/chrome/browser/ui/cocoa/view_id_util_browsertest.mm b/chrome/browser/ui/cocoa/view_id_util_browsertest.mm index 97bfe10..083b23d 100644 --- a/chrome/browser/ui/cocoa/view_id_util_browsertest.mm +++ b/chrome/browser/ui/cocoa/view_id_util_browsertest.mm @@ -112,7 +112,7 @@ IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) { browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); CheckViewID(static_cast<ViewID>(VIEW_ID_TAB_0 + i), true); // VIEW_ID_TAB_LAST should always be available. @@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(ViewIDTest, Tab) { browser()->OpenURL(OpenURLParams(GURL(url::kAboutBlankURL), Referrer(), NEW_BACKGROUND_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); CheckViewID(VIEW_ID_TAB_LAST, true); } diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm index 8c31923..fd83849 100644 --- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm +++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm @@ -353,7 +353,7 @@ void WebDialogWindowDelegateBridge::HandleKeyboardEvent( webContents_->GetController().LoadURL( delegate_->GetDialogContentURL(), content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); // TODO(akalin): add accelerator for ESC to close the dialog box. diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm index aaa48a5..7bf04ca 100644 --- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm +++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm @@ -526,7 +526,7 @@ NSColor* IdentityVerifiedTextColor() { - (void)showHelpPage:(id)sender { webContents_->OpenURL(content::OpenURLParams( GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); } // Create the contents of the Connection tab and add it to the given tab view. diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc index 34725c3..140751f 100644 --- a/chrome/browser/ui/extensions/application_launch.cc +++ b/chrome/browser/ui/extensions/application_launch.cc @@ -182,7 +182,7 @@ WebContents* OpenApplicationWindow(const AppLaunchParams& params) { Browser* browser = new Browser(browser_params); WebContents* web_contents = chrome::AddSelectedTabWithURL( - browser, url, content::PAGE_TRANSITION_AUTO_TOPLEVEL); + browser, url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL); web_contents->GetMutableRendererPrefs()->can_accept_load_drops = false; web_contents->GetRenderViewHost()->SyncRendererPrefs(); @@ -228,7 +228,7 @@ WebContents* OpenApplicationTab(const AppLaunchParams& launch_params) { GURL extension_url = UrlForExtension(extension, launch_params.override_url); chrome::NavigateParams params(browser, extension_url, - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.tabstrip_add_types = add_type; params.disposition = disposition; @@ -242,7 +242,7 @@ WebContents* OpenApplicationTab(const AppLaunchParams& launch_params) { extension_url, content::Referrer(existing_tab->GetURL(), blink::WebReferrerPolicyDefault), - disposition, content::PAGE_TRANSITION_LINK, false)); + disposition, ui::PAGE_TRANSITION_LINK, false)); // Reset existing_tab as OpenURL() may have clobbered it. existing_tab = browser->tab_strip_model()->GetActiveWebContents(); if (params.tabstrip_add_types & TabStripModel::ADD_PINNED) { diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc index edc1fb1..d6cad97 100644 --- a/chrome/browser/ui/extensions/extension_install_ui_default.cc +++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc @@ -133,7 +133,7 @@ bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { GURL("http://support.google.com/chrome_webstore/?p=crx_warning"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc index 5241fa4..b0bdf9b 100644 --- a/chrome/browser/ui/find_bar/find_bar_controller.cc +++ b/chrome/browser/ui/find_bar/find_bar_controller.cc @@ -153,12 +153,12 @@ void FindBarController::Observe(int type, if (source_controller == &web_contents_->GetController()) { content::LoadCommittedDetails* commit_details = content::Details<content::LoadCommittedDetails>(details).ptr(); - content::PageTransition transition_type = + ui::PageTransition transition_type = commit_details->entry->GetTransitionType(); // Hide the find bar on reload or navigation. if (find_bar_->IsFindBarVisible() && - (content::PageTransitionStripQualifier(transition_type) == - content::PAGE_TRANSITION_RELOAD || + (ui::PageTransitionStripQualifier(transition_type) == + ui::PAGE_TRANSITION_RELOAD || commit_details->is_navigation_to_different_page())) EndFindSession(kKeepSelectionOnPage, kClearResultsInFindBox); } diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index 13fc6e0..83e24e8 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -1203,7 +1203,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, PrepopulateInNewTab) { EXPECT_EQ(ASCIIToUTF16("1 of 1"), GetMatchCountText()); // Now create a second tab and load the same page. - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); WebContents* web_contents_2 = browser()->tab_strip_model()->GetActiveWebContents(); EXPECT_NE(web_contents_1, web_contents_2); @@ -1328,7 +1328,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(incognito_browser, url, - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); observer.Wait(); incognito_browser->window()->Show(); @@ -1349,7 +1349,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) { FindBarController::kKeepResultsInFindBox); // Now open a new tab in the original (non-incognito) browser. - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); WebContents* web_contents_2 = browser()->tab_strip_model()->GetActiveWebContents(); EXPECT_NE(web_contents_1, web_contents_2); @@ -1392,7 +1392,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FitWindow) { content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL( - popup, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_LINK); + popup, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_LINK); // Wait for the page to finish loading. observer.Wait(); popup->window()->Show(); diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_browsertest.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_browsertest.cc index 210ca2f..6a751e6 100644 --- a/chrome/browser/ui/fullscreen/fullscreen_controller_browsertest.cc +++ b/chrome/browser/ui/fullscreen/fullscreen_controller_browsertest.cc @@ -22,7 +22,7 @@ using url::kAboutBlankURL; using content::WebContents; -using content::PAGE_TRANSITION_TYPED; +using ui::PAGE_TRANSITION_TYPED; class FullscreenControllerBrowserTest: public FullscreenControllerTest { }; diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc index 9a51374..4fa9851 100644 --- a/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc +++ b/chrome/browser/ui/fullscreen/fullscreen_controller_interactive_browsertest.cc @@ -24,7 +24,7 @@ using url::kAboutBlankURL; using content::WebContents; -using content::PAGE_TRANSITION_TYPED; +using ui::PAGE_TRANSITION_TYPED; namespace { diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_state_interactive_browsertest.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_state_interactive_browsertest.cc index 01c7ac3..e828c8a 100644 --- a/chrome/browser/ui/fullscreen/fullscreen_controller_state_interactive_browsertest.cc +++ b/chrome/browser/ui/fullscreen/fullscreen_controller_state_interactive_browsertest.cc @@ -54,7 +54,7 @@ Browser* FullscreenControllerStateInteractiveTest::GetBrowser() { IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, DISABLED_TransitionsForEachState) { // A tab is needed for tab fullscreen. - AddTabAtIndex(0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED); TestTransitionsForEachState(); // Progress of test can be examined via LOG(INFO) << GetAndClearDebugLog(); } @@ -65,15 +65,15 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, // An "empty" test is included as part of each "TEST_EVENT" because it makes // running the entire test suite less flaky on MacOS. All of the tests pass // when run individually. -#define TEST_EVENT(state, event) \ - IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ - DISABLED_##state##__##event##__Empty) {} \ - IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ - DISABLED_##state##__##event) { \ - AddTabAtIndex( \ - 0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); \ - ASSERT_NO_FATAL_FAILURE(TestStateAndEvent(state, event)) \ - << GetAndClearDebugLog(); \ +#define TEST_EVENT(state, event) \ + IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ + DISABLED_##state##__##event##__Empty) {} \ + IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, \ + DISABLED_##state##__##event) { \ + AddTabAtIndex( \ + 0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED); \ + ASSERT_NO_FATAL_FAILURE(TestStateAndEvent(state, event)) \ + << GetAndClearDebugLog(); \ } // Progress of tests can be examined by inserting the following line: // LOG(INFO) << GetAndClearDebugLog(); } @@ -87,7 +87,7 @@ IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, IN_PROC_BROWSER_TEST_F(FullscreenControllerStateInteractiveTest, DISABLED_ManualTest) { // A tab is needed for tab fullscreen. - AddTabAtIndex(0, GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_TYPED); ASSERT_TRUE(InvokeEvent(TOGGLE_FULLSCREEN)) << GetAndClearDebugLog(); ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE)) << GetAndClearDebugLog(); ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE)) << GetAndClearDebugLog(); diff --git a/chrome/browser/ui/location_bar/location_bar.h b/chrome/browser/ui/location_bar/location_bar.h index 53a2c9f..2a05187 100644 --- a/chrome/browser/ui/location_bar/location_bar.h +++ b/chrome/browser/ui/location_bar/location_bar.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_H_ #define CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_H_ -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "url/gurl.h" @@ -37,7 +37,7 @@ class LocationBar { // The details necessary to open the user's desired omnibox match. virtual GURL GetDestinationURL() const = 0; virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0; - virtual content::PageTransition GetPageTransition() const = 0; + virtual ui::PageTransition GetPageTransition() const = 0; // Accepts the current string of text entered in the location bar. virtual void AcceptInput() = 0; diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc index 004f68d..2d0a2a8 100644 --- a/chrome/browser/ui/login/login_prompt_browsertest.cc +++ b/chrome/browser/ui/login/login_prompt_browsertest.cc @@ -179,7 +179,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, PrefetchAuthCancels) { WindowedLoadStopObserver load_stop_waiter(controller, 1); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); load_stop_waiter.Wait(); @@ -202,7 +202,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestBasicAuth) { { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -252,7 +252,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestDigestAuth) { { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -315,7 +315,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestTwoAuths) { WindowedAuthNeededObserver auth_needed_waiter(controller1); contents1->OpenURL(OpenURLParams( test_server()->GetURL(kAuthBasicPage), Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -323,7 +323,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestTwoAuths) { WindowedAuthNeededObserver auth_needed_waiter(controller2); contents2->OpenURL(OpenURLParams( test_server()->GetURL(kAuthDigestPage), Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); + CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -374,12 +374,12 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) { WindowedLoadStopObserver load_stop_waiter(controller, 2); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - auth_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + auth_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); WindowedAuthCancelledObserver auth_cancelled_waiter(controller); browser()->OpenURL(OpenURLParams( - no_auth_page_2, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + no_auth_page_2, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_cancelled_waiter.Wait(); load_stop_waiter.Wait(); @@ -392,7 +392,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) { WindowedLoadStopObserver load_stop_waiter(controller, 2); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - auth_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + auth_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); WindowedAuthCancelledObserver auth_cancelled_waiter(controller); @@ -416,7 +416,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) { WindowedLoadStopObserver load_stop_waiter(controller, 2); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - auth_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + auth_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); WindowedAuthCancelledObserver auth_cancelled_waiter(controller); @@ -432,7 +432,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) { WindowedLoadStopObserver load_stop_waiter(controller, 1); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - auth_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + auth_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); WindowedAuthCancelledObserver auth_cancelled_waiter(controller); @@ -466,7 +466,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmCancellation) { { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -519,7 +519,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmConfirmation) { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -566,7 +566,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, IncorrectConfirmation) { { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -639,7 +639,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, NoLoginPromptForFavicon) { GURL test_page = test_server()->GetURL(kFaviconTestPage); WindowedLoadStopObserver load_stop_waiter(controller, 1); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); load_stop_waiter.Wait(); } @@ -651,7 +651,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, NoLoginPromptForFavicon) { WindowedLoadStopObserver load_stop_waiter(controller, 1); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); ASSERT_EQ(1u, observer.handlers().size()); @@ -704,7 +704,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, WindowedLoadStopObserver load_stop_waiter(controller, 1); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); load_stop_waiter.Wait(); } @@ -726,7 +726,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); ASSERT_EQ(1u, observer.handlers().size()); @@ -774,7 +774,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); ASSERT_EQ(1u, observer.handlers().size()); @@ -834,13 +834,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) { test_server()->GetURL("auth-basic/1"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); contents_2->OpenURL(OpenURLParams( test_server()->GetURL("auth-basic/2"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter_1.Wait(); auth_needed_waiter_2.Wait(); @@ -898,13 +898,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) { test_server()->GetURL("auth-basic/1"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); contents_2->OpenURL(OpenURLParams( test_server()->GetURL("auth-basic/2"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter_1.Wait(); auth_needed_waiter_2.Wait(); @@ -963,13 +963,13 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, test_server()->GetURL("auth-basic/1"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); contents_incognito->OpenURL(OpenURLParams( test_server()->GetURL("auth-basic/2"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); auth_needed_waiter_incognito.Wait(); @@ -1023,7 +1023,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, GURL test_page = test_server()->GetURL(kXHRTestPage); WindowedLoadStopObserver load_stop_waiter(controller, 1); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); load_stop_waiter.Wait(); } @@ -1058,7 +1058,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, GURL test_page = test_server()->GetURL(kXHRTestPage); WindowedLoadStopObserver load_stop_waiter(controller, 1); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); load_stop_waiter.Wait(); } @@ -1093,7 +1093,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, GURL test_page = test_server()->GetURL(kXHRTestPage); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -1157,7 +1157,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, GURL test_page = test_server()->GetURL(kXHRTestPage); WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); auth_needed_waiter.Wait(); } @@ -1197,7 +1197,7 @@ void LoginPromptBrowserTest::TestCrossOriginPrompt( { WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - visit_url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + visit_url, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); ASSERT_EQ(visit_url.host(), contents->GetVisibleURL().host()); auth_needed_waiter.Wait(); @@ -1274,7 +1274,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, WindowedAuthNeededObserver auth_needed_waiter(controller); browser()->OpenURL(OpenURLParams( - test_page, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, + test_page, Referrer(), CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); ASSERT_EQ("127.0.0.1", contents->GetURL().host()); WaitForInterstitialAttach(contents); diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc index 0b124bb..5d237ee 100644 --- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc +++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc @@ -84,7 +84,7 @@ bool AlternateNavInfoBarDelegate::LinkClicked( // default action when it's typed again in the future. InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( content::OpenURLParams(match_.destination_url, content::Referrer(), - disposition, content::PAGE_TRANSITION_TYPED, + disposition, ui::PAGE_TRANSITION_TYPED, false)); // We should always close, even if the navigation did not occur within this diff --git a/chrome/browser/ui/omnibox/omnibox_edit_controller.cc b/chrome/browser/ui/omnibox/omnibox_edit_controller.cc index 05d01bb..480d8dd 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_controller.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_controller.cc @@ -11,7 +11,7 @@ void OmniboxEditController::OnAutocompleteAccept( const GURL& destination_url, WindowOpenDisposition disposition, - content::PageTransition transition) { + ui::PageTransition transition) { destination_url_ = destination_url; disposition_ = disposition; transition_ = transition; @@ -22,9 +22,9 @@ void OmniboxEditController::OnAutocompleteAccept( OmniboxEditController::OmniboxEditController(CommandUpdater* command_updater) : command_updater_(command_updater), disposition_(CURRENT_TAB), - transition_(content::PageTransitionFromInt( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR)) { + transition_(ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)) { } void OmniboxEditController::HideOriginChip() { diff --git a/chrome/browser/ui/omnibox/omnibox_edit_controller.h b/chrome/browser/ui/omnibox/omnibox_edit_controller.h index 5ec29f4..f1e849f 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_controller.h +++ b/chrome/browser/ui/omnibox/omnibox_edit_controller.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ #include "base/strings/string16.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "url/gurl.h" @@ -30,7 +30,7 @@ class OmniboxEditController { public: void OnAutocompleteAccept(const GURL& destination_url, WindowOpenDisposition disposition, - content::PageTransition transition); + ui::PageTransition transition); // Updates the controller, and, if |contents| is non-NULL, restores saved // state that the tab holds. @@ -78,7 +78,7 @@ class OmniboxEditController { CommandUpdater* command_updater() { return command_updater_; } GURL destination_url() const { return destination_url_; } WindowOpenDisposition disposition() const { return disposition_; } - content::PageTransition transition() const { return transition_; } + ui::PageTransition transition() const { return transition_; } private: CommandUpdater* command_updater_; @@ -86,7 +86,7 @@ class OmniboxEditController { // The details necessary to open the user's desired omnibox match. GURL destination_url_; WindowOpenDisposition disposition_; - content::PageTransition transition_; + ui::PageTransition transition_; DISALLOW_COPY_AND_ASSIGN(OmniboxEditController); }; diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index d0c976d..3550347 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -119,7 +119,7 @@ const int kPercentageMatchHistogramWidthBuckets[] = { 400, 700, 1200 }; void RecordPercentageMatchHistogram(const base::string16& old_text, const base::string16& new_text, bool url_replacement_active, - content::PageTransition transition, + ui::PageTransition transition, int omnibox_width) { size_t avg_length = (old_text.length() + new_text.length()) / 2; @@ -135,7 +135,7 @@ void RecordPercentageMatchHistogram(const base::string16& old_text, std::string histogram_name; if (url_replacement_active) { - if (transition == content::PAGE_TRANSITION_TYPED) { + if (transition == ui::PAGE_TRANSITION_TYPED) { histogram_name = "InstantExtended.PercentageMatchV2_QuerytoURL"; UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent); } else { @@ -143,7 +143,7 @@ void RecordPercentageMatchHistogram(const base::string16& old_text, UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent); } } else { - if (transition == content::PAGE_TRANSITION_TYPED) { + if (transition == ui::PAGE_TRANSITION_TYPED) { histogram_name = "InstantExtended.PercentageMatchV2_URLtoURL"; UMA_HISTOGRAM_PERCENTAGE(histogram_name, percent); } else { @@ -669,7 +669,7 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition, if (!match.destination_url.is_valid()) return; - if ((match.transition == content::PAGE_TRANSITION_TYPED) && + if ((match.transition == ui::PAGE_TRANSITION_TYPED) && (match.destination_url == PermanentURL())) { // When the user hit enter on the existing permanent URL, treat it like a // reload for scoring purposes. We could detect this by just checking @@ -680,13 +680,13 @@ void OmniboxEditModel::AcceptInput(WindowOpenDisposition disposition, // different from the current URL, even if it wound up at the same place // (e.g. manually retyping the same search query), and it seems wrong to // treat this as a reload. - match.transition = content::PAGE_TRANSITION_RELOAD; + match.transition = ui::PAGE_TRANSITION_RELOAD; } else if (for_drop || ((paste_state_ != NONE) && match.is_history_what_you_typed_match)) { // When the user pasted in a URL and hit enter, score it like a link click // rather than a normal typed URL, so it doesn't get inline autocompleted // as aggressively later. - match.transition = content::PAGE_TRANSITION_LINK; + match.transition = ui::PAGE_TRANSITION_LINK; } TemplateURLService* service = @@ -792,7 +792,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, TemplateURLServiceFactory::GetForProfile(profile_); TemplateURL* template_url = match.GetTemplateURL(service, false); if (template_url) { - if (match.transition == content::PAGE_TRANSITION_KEYWORD) { + if (match.transition == ui::PAGE_TRANSITION_KEYWORD) { // The user is using a non-substituting keyword or is explicitly in // keyword mode. @@ -809,7 +809,7 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, TemplateURLServiceFactory::GetForProfile(profile_)->IncrementUsageCount( template_url); } else { - DCHECK_EQ(content::PAGE_TRANSITION_GENERATED, match.transition); + DCHECK_EQ(ui::PAGE_TRANSITION_GENERATED, match.transition); // NOTE: We purposefully don't increment the usage count of the default // search engine here like we do for explicit keywords above; see comments // in template_url.h. @@ -848,8 +848,8 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match, base::AutoReset<bool> tmp(&in_revert_, true); controller_->OnAutocompleteAccept( match.destination_url, disposition, - content::PageTransitionFromInt( - match.transition | content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); + ui::PageTransitionFromInt( + match.transition | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); if (observer->load_state() != OmniboxNavigationObserver::LOAD_NOT_SEEN) ignore_result(observer.release()); // The observer will delete itself. } @@ -1339,7 +1339,7 @@ void OmniboxEditModel::GetInfoForCurrentText(AutocompleteMatch* match, match->provider = autocomplete_controller()->search_provider(); match->destination_url = delegate_->GetNavigationController().GetVisibleEntry()->GetURL(); - match->transition = content::PAGE_TRANSITION_RELOAD; + match->transition = ui::PAGE_TRANSITION_RELOAD; } else if (query_in_progress() || (popup_model() && popup_model()->IsOpen())) { if (query_in_progress()) { diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h index 987b75b..5b05ee1 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.h +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h @@ -17,7 +17,6 @@ #include "components/metrics/proto/omnibox_event.pb.h" #include "components/omnibox/autocomplete_input.h" #include "components/omnibox/autocomplete_match.h" -#include "content/public/common/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/native_widget_types.h" #include "url/gurl.h" diff --git a/chrome/browser/ui/panels/panel_host.cc b/chrome/browser/ui/panels/panel_host.cc index ed6b629..28d5ae2 100644 --- a/chrome/browser/ui/panels/panel_host.cc +++ b/chrome/browser/ui/panels/panel_host.cc @@ -72,7 +72,7 @@ void PanelHost::Init(const GURL& url) { web_contents_.get()); web_contents_->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); } void PanelHost::DestroyWebContents() { @@ -104,7 +104,7 @@ content::WebContents* PanelHost::OpenURLFromTab( return NULL; // Only allow clicks on links. - if (params.transition != content::PAGE_TRANSITION_LINK) + if (params.transition != ui::PAGE_TRANSITION_LINK) return NULL; // Force all links to open in a new tab. @@ -142,7 +142,7 @@ void PanelHost::AddNewContents(content::WebContents* source, bool user_gesture, bool* was_blocked) { chrome::NavigateParams navigate_params(profile_, new_contents->GetURL(), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); navigate_params.target_contents = new_contents; // Force all links to open in a new tab, even if they were trying to open a diff --git a/chrome/browser/ui/passwords/manage_passwords_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc index e3abdc6..8f0bf97 100644 --- a/chrome/browser/ui/passwords/manage_passwords_test.cc +++ b/chrome/browser/ui/passwords/manage_passwords_test.cc @@ -22,7 +22,7 @@ #include "testing/gtest/include/gtest/gtest.h" void ManagePasswordsTest::SetUpOnMainThread() { - AddTabAtIndex(0, GURL("http://example.com/"), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GURL("http://example.com/"), ui::PAGE_TRANSITION_TYPED); // Create the test UIController here so that it's bound to the currently // active WebContents. new ManagePasswordsUIControllerMock( diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc index df2cc29..0dc9467 100644 --- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc +++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc @@ -174,7 +174,7 @@ void ManagePasswordsUIController::NavigateToAccountCentralManagementPage() { Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); content::OpenURLParams params( GURL(chrome::kAutoPasswordGenerationLearnMoreURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false); browser->OpenURL(params); #endif } diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc index d1a351d..5705cea 100644 --- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc +++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc @@ -87,11 +87,11 @@ PDFEnableAdobeReaderPromptClient::~PDFEnableAdobeReaderPromptClient() { bool PDFEnableAdobeReaderPromptClient::ShouldExpire( const content::LoadCommittedDetails& details) const { - content::PageTransition transition = - content::PageTransitionStripQualifier(details.entry->GetTransitionType()); + ui::PageTransition transition = + ui::PageTransitionStripQualifier(details.entry->GetTransitionType()); // We don't want to expire on a reload, because that is how we open the PDF in // Reader. - return !details.is_in_page && transition != content::PAGE_TRANSITION_RELOAD; + return !details.is_in_page && transition != ui::PAGE_TRANSITION_RELOAD; } void PDFEnableAdobeReaderPromptClient::Accept() { @@ -123,7 +123,7 @@ base::string16 PDFEnableAdobeReaderPromptClient::GetMessageText() const { void OpenReaderUpdateURL(WebContents* web_contents) { OpenURLParams params( GURL(kAdobeReaderUpdateUrl), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); web_contents->OpenURL(params); } diff --git a/chrome/browser/ui/search/instant_page.cc b/chrome/browser/ui/search/instant_page.cc index 07d09a2..3b412ac 100644 --- a/chrome/browser/ui/search/instant_page.cc +++ b/chrome/browser/ui/search/instant_page.cc @@ -74,7 +74,7 @@ bool InstantPage::ShouldProcessAboutToNavigateMainFrame() { void InstantPage::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition /* transition_type */) { + ui::PageTransition /* transition_type */) { if (!render_frame_host->GetParent() && ShouldProcessAboutToNavigateMainFrame()) delegate_->InstantPageAboutToNavigateMainFrame(web_contents(), url); diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h index 9ce3168..1d6d069 100644 --- a/chrome/browser/ui/search/instant_page.h +++ b/chrome/browser/ui/search/instant_page.h @@ -13,7 +13,7 @@ #include "base/strings/string16.h" #include "chrome/browser/ui/search/search_model_observer.h" #include "content/public/browser/web_contents_observer.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" class GURL; class Profile; @@ -102,7 +102,7 @@ class InstantPage : public content::WebContentsObserver, virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; // Overridden from SearchModelObserver: virtual void ModelChanged(const SearchModel::State& old_state, diff --git a/chrome/browser/ui/search/instant_page_unittest.cc b/chrome/browser/ui/search/instant_page_unittest.cc index 1632bcc..ce137dc 100644 --- a/chrome/browser/ui/search/instant_page_unittest.cc +++ b/chrome/browser/ui/search/instant_page_unittest.cc @@ -40,7 +40,7 @@ class FakePageDelegate : public InstantPage::Delegate { MOCK_METHOD5(NavigateToURL, void(const content::WebContents* contents, const GURL& url, - content::PageTransition transition, + ui::PageTransition transition, WindowOpenDisposition disposition, bool is_search_type)); }; diff --git a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc index 8fb39d6..09aae44 100644 --- a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc +++ b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc @@ -354,7 +354,7 @@ TEST_F(InstantSearchPrerendererTest, UsePrerenderPage) { // the browser swaps the current tab contents with the prerendered contents. GURL url("https://www.google.com/alt#quux=foo&strk"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_EQ(GetPrerenderURL(), GetActiveWebContents()->GetURL()); EXPECT_EQ(static_cast<PrerenderHandle*>(NULL), prerender_handle()); @@ -372,7 +372,7 @@ TEST_F(InstantSearchPrerendererTest, PrerenderRequestCancelled) { // Make sure the browser navigates the current tab to this |url|. GURL url("https://www.google.com/alt#quux=foo&strk"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_NE(GetPrerenderURL(), GetActiveWebContents()->GetURL()); EXPECT_EQ(url, GetActiveWebContents()->GetURL()); @@ -387,7 +387,7 @@ TEST_F(InstantSearchPrerendererTest, // tab contents with the prerendered contents. GURL url("https://www.google.com/alt#quux=pen&strk"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_EQ(GetPrerenderURL(), GetActiveWebContents()->GetURL()); EXPECT_EQ(static_cast<PrerenderHandle*>(NULL), prerender_handle()); @@ -401,7 +401,7 @@ TEST_F(InstantSearchPrerendererTest, // the active prerender request upon the receipt of empty search query. GURL url("https://www.google.com/alt#quux=&strk"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_NE(GetPrerenderURL(), GetActiveWebContents()->GetURL()); EXPECT_EQ(url, GetActiveWebContents()->GetURL()); @@ -416,7 +416,7 @@ TEST_F(InstantSearchPrerendererTest, // the active prerender request for unsupported window dispositions. GURL url("https://www.google.com/alt#quux=pen&strk"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); content::WebContents* new_tab = browser()->tab_strip_model()->GetWebContentsAt(1); @@ -488,7 +488,7 @@ TEST_F(TestUsePrerenderPage, ExtractSearchTermsAndUsePrerenderPage) { // and uses the prerendered page contents. GURL url("https://www.google.com/alt#quux=foo"); browser()->OpenURL(content::OpenURLParams(url, Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, false)); EXPECT_EQ(GetPrerenderURL(), GetActiveWebContents()->GetURL()); EXPECT_EQ(static_cast<PrerenderHandle*>(NULL), prerender_handle()); diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc index d479c98..c4ec74c 100644 --- a/chrome/browser/ui/search/search_tab_helper.cc +++ b/chrome/browser/ui/search/search_tab_helper.cc @@ -45,10 +45,10 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/common/referrer.h" #include "net/base/net_errors.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(SearchTabHelper); @@ -620,7 +620,7 @@ void SearchTabHelper::RedirectToLocalNTP() { content::NavigationController::LoadURLParams load_params( (GURL(chrome::kChromeSearchLocalNtpUrl))); load_params.referrer = content::Referrer(); - load_params.transition_type = content::PAGE_TRANSITION_SERVER_REDIRECT; + load_params.transition_type = ui::PAGE_TRANSITION_SERVER_REDIRECT; // Don't push a history entry. load_params.should_replace_current_entry = true; web_contents_->GetController().LoadURLWithParams(load_params); diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc index faa6329..c3f812c 100644 --- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc +++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc @@ -32,8 +32,8 @@ namespace { // Returns true if the entry's transition type is FORM_SUBMIT. bool IsFormSubmit(const NavigationEntry* entry) { - return (content::PageTransitionStripQualifier(entry->GetTransitionType()) == - content::PAGE_TRANSITION_FORM_SUBMIT); + return (ui::PageTransitionStripQualifier(entry->GetTransitionType()) == + ui::PAGE_TRANSITION_FORM_SUBMIT); } base::string16 GenerateKeywordFromNavigationEntry( diff --git a/chrome/browser/ui/settings_window_manager.cc b/chrome/browser/ui/settings_window_manager.cc index 5bbae78..c60d5ae 100644 --- a/chrome/browser/ui/settings_window_manager.cc +++ b/chrome/browser/ui/settings_window_manager.cc @@ -46,7 +46,7 @@ void SettingsWindowManager::ShowChromePageForProfile(Profile* profile, return; } NavigateParams params(browser, gurl, - content::PAGE_TRANSITION_AUTO_BOOKMARK); + ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.window_action = NavigateParams::SHOW_WINDOW; params.user_gesture = true; chrome::Navigate(¶ms); @@ -54,7 +54,7 @@ void SettingsWindowManager::ShowChromePageForProfile(Profile* profile, } // No existing browser window, create one. - NavigateParams params(profile, gurl, content::PAGE_TRANSITION_AUTO_BOOKMARK); + NavigateParams params(profile, gurl, ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.disposition = NEW_POPUP; params.trusted_source = true; params.window_action = NavigateParams::SHOW_WINDOW; diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc index 6ccf89e..60cf852 100644 --- a/chrome/browser/ui/singleton_tabs.cc +++ b/chrome/browser/ui/singleton_tabs.cc @@ -61,7 +61,7 @@ void ShowSingletonTabOverwritingNTP(Browser* browser, NavigateParams GetSingletonTabNavigateParams(Browser* browser, const GURL& url) { - NavigateParams params(browser, url, content::PAGE_TRANSITION_AUTO_BOOKMARK); + NavigateParams params(browser, url, ui::PAGE_TRANSITION_AUTO_BOOKMARK); params.disposition = SINGLETON_TAB; params.window_action = NavigateParams::SHOW_WINDOW; params.user_gesture = true; diff --git a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc index 6223847..edea11a 100644 --- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc +++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc @@ -48,6 +48,6 @@ bool GoogleApiKeysInfoBarDelegate::LinkClicked( GURL("http://www.chromium.org/developers/how-tos/api-keys"), content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc index 5f3a02e..d10f849 100644 --- a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc +++ b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc @@ -66,6 +66,6 @@ bool ObsoleteSystemInfoBarDelegate::LinkClicked( #endif content::Referrer(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false)); + ui::PAGE_TRANSITION_LINK, false)); return false; } diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index 1c3702b..0e150d0 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc @@ -773,7 +773,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( add_types |= TabStripModel::ADD_PINNED; chrome::NavigateParams params(browser, tabs[i].url, - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; params.tabstrip_add_types = add_types; params.extension_app_id = tabs[i].app_id; diff --git a/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc index 66e6bce..0712703 100644 --- a/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc +++ b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.cc @@ -18,7 +18,7 @@ void OneClickSigninBubbleLinksDelegate::OnLearnMoreLinkClicked( bool is_dialog) { chrome::NavigateParams params(browser_, GURL(chrome::kChromeSyncLearnMoreURL), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = is_dialog ? NEW_WINDOW : NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc index 1118fab..afbefba 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc @@ -79,7 +79,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/common/frame_navigate_params.h" -#include "content/public/common/page_transition_types.h" #include "google_apis/gaia/gaia_auth_util.h" #include "google_apis/gaia/gaia_urls.h" #include "grit/components_strings.h" @@ -88,6 +87,7 @@ #include "net/cookies/cookie_monster.h" #include "net/url_request/url_request.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" @@ -209,7 +209,7 @@ void ConfirmEmailDialogDelegate::OnLinkClicked( GURL(chrome::kChromeSyncMergeTroubleshootingURL), content::Referrer(), NEW_POPUP, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false); // It is guaranteed that |web_contents_| is valid here because when it's // deleted, the dialog is immediately closed and no further action can be @@ -443,7 +443,7 @@ class CurrentHistoryCleaner : public content::WebContentsObserver { virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; private: scoped_ptr<content::WebContents> contents_; @@ -464,7 +464,7 @@ CurrentHistoryCleaner::~CurrentHistoryCleaner() { void CurrentHistoryCleaner::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { // Return early if this is not top-level navigation. if (render_frame_host->GetParent()) return; @@ -1204,7 +1204,7 @@ void OneClickSigninHelper::RedirectToNtpOrAppsPage( content::OpenURLParams params(url, content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false); contents->OpenURL(params); } @@ -1230,7 +1230,7 @@ void OneClickSigninHelper::RedirectToSignin() { content::WebContents* contents = web_contents(); contents->GetController().LoadURL(page, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } @@ -1314,7 +1314,7 @@ void OneClickSigninHelper::DidNavigateMainFrame( // If the navigation to a non-sign-in URL hasn't been triggered by the web // contents, the sign in flow has been aborted and the state must be // cleaned (crbug.com/269421). - if (!content::PageTransitionIsWebTriggerable(params.transition) && + if (!ui::PageTransitionIsWebTriggerable(params.transition) && auto_accept_ != AUTO_ACCEPT_NONE) { CleanTransientState(); } diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc index d9ee9b1..a69c8a4 100644 --- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc +++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc @@ -723,7 +723,7 @@ TEST_F(OneClickSigninHelperTest, CleanTransientStateOnNavigate) { content::LoadCommittedDetails details; content::FrameNavigateParams params; params.url = GURL("http://crbug.com"); - params.transition = content::PAGE_TRANSITION_TYPED; + params.transition = ui::PAGE_TRANSITION_TYPED; helper->DidNavigateMainFrame(details, params); EXPECT_EQ(OneClickSigninHelper::AUTO_ACCEPT_NONE, helper->auto_accept_); @@ -735,7 +735,7 @@ TEST_F(OneClickSigninHelperTest, NoRedirectToNTPWithPendingEntry) { const GURL fooWebUIURL("chrome://foo"); controller.LoadURL(fooWebUIURL, content::Referrer(), - content::PAGE_TRANSITION_TYPED, std::string()); + ui::PAGE_TRANSITION_TYPED, std::string()); EXPECT_EQ(fooWebUIURL, controller.GetPendingEntry()->GetURL()); MockWebContentsDelegate delegate; diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer.cc b/chrome/browser/ui/sync/one_click_signin_sync_observer.cc index 254d991..5774def 100644 --- a/chrome/browser/ui/sync/one_click_signin_sync_observer.cc +++ b/chrome/browser/ui/sync/one_click_signin_sync_observer.cc @@ -95,7 +95,7 @@ void OneClickSigninSyncObserver::LoadContinueUrl() { web_contents()->GetController().LoadURL( continue_url_, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc index 24ca39f..98a1c98 100644 --- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc @@ -599,7 +599,7 @@ void OneClickSigninSyncStarter::ShowSettingsPageInWebContents( content::OpenURLParams params(url, content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false); contents->OpenURL(params); @@ -615,6 +615,6 @@ void OneClickSigninSyncStarter::LoadContinueUrl() { web_contents()->GetController().LoadURL( continue_url_, content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc index 87e476a..62d926c 100644 --- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc +++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc @@ -243,7 +243,7 @@ TEST_F(ProfileSigninConfirmationHelperTest, base::snprintf(buf, arraysize(buf), "http://foo.com/%d", i); history->AddPage( GURL(std::string(buf)), base::Time::Now(), NULL, 1, - GURL(), history::RedirectList(), content::PAGE_TRANSITION_LINK, + GURL(), history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); } EXPECT_TRUE( @@ -264,7 +264,7 @@ TEST_F(ProfileSigninConfirmationHelperTest, // Profile is new but has a typed URL. history->AddPage( GURL("http://example.com"), base::Time::Now(), NULL, 1, - GURL(), history::RedirectList(), content::PAGE_TRANSITION_TYPED, + GURL(), history::RedirectList(), ui::PAGE_TRANSITION_TYPED, history::SOURCE_BROWSED, false); EXPECT_TRUE( GetCallbackResult( diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc index ee360e9..41cbc7e9 100644 --- a/chrome/browser/ui/tab_contents/core_tab_helper.cc +++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc @@ -242,7 +242,7 @@ void CoreTabHelper::OnRequestThumbnailForContextNodeACK( content::OpenURLParams open_url_params( result, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); const std::string& content_type = post_content.first; std::string* post_data = &post_content.second; if (!post_data->empty()) { diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc index 30be260..9ea83cc 100644 --- a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc +++ b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc @@ -120,7 +120,7 @@ IN_PROC_BROWSER_TEST_F(TabModalConfirmDialogTest, Navigate) { content::OpenURLParams params(GURL("about:blank"), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); browser()->tab_strip_model()->GetActiveWebContents()->OpenURL(params); diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index b3a596c..b7c60fb 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc @@ -36,12 +36,12 @@ namespace { // forgotten. This is generally any navigation that isn't a link click (i.e. // any navigation that can be considered to be the start of a new task distinct // from what had previously occurred in that tab). -bool ShouldForgetOpenersForTransition(content::PageTransition transition) { - return transition == content::PAGE_TRANSITION_TYPED || - transition == content::PAGE_TRANSITION_AUTO_BOOKMARK || - transition == content::PAGE_TRANSITION_GENERATED || - transition == content::PAGE_TRANSITION_KEYWORD || - transition == content::PAGE_TRANSITION_AUTO_TOPLEVEL; +bool ShouldForgetOpenersForTransition(ui::PageTransition transition) { + return transition == ui::PAGE_TRANSITION_TYPED || + transition == ui::PAGE_TRANSITION_AUTO_BOOKMARK || + transition == ui::PAGE_TRANSITION_GENERATED || + transition == ui::PAGE_TRANSITION_KEYWORD || + transition == ui::PAGE_TRANSITION_AUTO_TOPLEVEL; } // CloseTracker is used when closing a set of WebContents. It listens for @@ -605,7 +605,7 @@ int TabStripModel::GetIndexOfLastWebContentsOpenedBy(const WebContents* opener, } void TabStripModel::TabNavigating(WebContents* contents, - content::PageTransition transition) { + ui::PageTransition transition) { if (ShouldForgetOpenersForTransition(transition)) { // Don't forget the openers if this tab is a New Tab page opened at the // end of the TabStrip (e.g. by pressing Ctrl+T). Give the user one @@ -783,14 +783,14 @@ void TabStripModel::SetSelectionFromModel( void TabStripModel::AddWebContents(WebContents* contents, int index, - content::PageTransition transition, + ui::PageTransition transition, int add_types) { // If the newly-opened tab is part of the same task as the parent tab, we want // to inherit the parent's "group" attribute, so that if this tab is then // closed we'll jump back to the parent tab. bool inherit_group = (add_types & ADD_INHERIT_GROUP) == ADD_INHERIT_GROUP; - if (transition == content::PAGE_TRANSITION_LINK && + if (transition == ui::PAGE_TRANSITION_LINK && (add_types & ADD_FORCE_INDEX) == 0) { // We assume tabs opened via link clicks are part of the same task as their // parent. Note that when |force_index| is true (e.g. when the user @@ -807,7 +807,7 @@ void TabStripModel::AddWebContents(WebContents* contents, index = count(); } - if (transition == content::PAGE_TRANSITION_TYPED && index == count()) { + if (transition == ui::PAGE_TRANSITION_TYPED && index == count()) { // Also, any tab opened at the end of the TabStrip with a "TYPED" // transition inherit group as well. This covers the cases where the user // creates a New Tab (e.g. Ctrl+T, or clicks the New Tab button), or types @@ -821,7 +821,7 @@ void TabStripModel::AddWebContents(WebContents* contents, // Reset the index, just in case insert ended up moving it on us. index = GetIndexOfWebContents(contents); - if (inherit_group && transition == content::PAGE_TRANSITION_TYPED) + if (inherit_group && transition == ui::PAGE_TRANSITION_TYPED) contents_data_[index]->set_reset_group_on_select(true); // TODO(sky): figure out why this is here and not in InsertWebContentsAt. When diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h index 0865469..2527946 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.h +++ b/chrome/browser/ui/tabs/tab_strip_model.h @@ -10,8 +10,8 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" -#include "content/public/common/page_transition_types.h" #include "ui/base/models/list_selection_model.h" +#include "ui/base/page_transition_types.h" class Profile; class TabStripModelDelegate; @@ -294,7 +294,7 @@ class TabStripModel { // navigation, the TabStripModel may adjust its selection and grouping // behavior. void TabNavigating(content::WebContents* contents, - content::PageTransition transition); + ui::PageTransition transition); // Forget all Opener relationships that are stored (but _not_ group // relationships!) This is to reduce unpredictable tab switching behavior @@ -382,7 +382,7 @@ class TabStripModel { // append the contents to the end of the tab strip. void AddWebContents(content::WebContents* contents, int index, - content::PageTransition transition, + ui::PageTransition transition, int add_types); // Closes the selected tabs. diff --git a/chrome/browser/ui/tabs/tab_strip_model_delegate.h b/chrome/browser/ui/tabs/tab_strip_model_delegate.h index 4bd8ad2..50e8b93 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_delegate.h +++ b/chrome/browser/ui/tabs/tab_strip_model_delegate.h @@ -7,8 +7,6 @@ #include <vector> -#include "content/public/common/page_transition_types.h" - class Browser; class GURL; diff --git a/chrome/browser/ui/tabs/tab_strip_model_order_controller.cc b/chrome/browser/ui/tabs/tab_strip_model_order_controller.cc index 52e8758..b91b348 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_order_controller.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_order_controller.cc @@ -20,7 +20,7 @@ TabStripModelOrderController::~TabStripModelOrderController() { } int TabStripModelOrderController::DetermineInsertionIndex( - content::PageTransition transition, + ui::PageTransition transition, bool foreground) { int tab_count = tabstrip_->count(); if (!tab_count) @@ -28,7 +28,7 @@ int TabStripModelOrderController::DetermineInsertionIndex( // NOTE: TabStripModel enforces that all non-mini-tabs occur after mini-tabs, // so we don't have to check here too. - if (transition == content::PAGE_TRANSITION_LINK && + if (transition == ui::PAGE_TRANSITION_LINK && tabstrip_->active_index() != -1) { if (foreground) { // If the page was opened in the foreground by a link click in another diff --git a/chrome/browser/ui/tabs/tab_strip_model_order_controller.h b/chrome/browser/ui/tabs/tab_strip_model_order_controller.h index 60aa416..cfe8e63 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_order_controller.h +++ b/chrome/browser/ui/tabs/tab_strip_model_order_controller.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_ #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" /////////////////////////////////////////////////////////////////////////////// // TabStripModelOrderController @@ -21,7 +21,7 @@ class TabStripModelOrderController : public TabStripModelObserver { // Determine where to place a newly opened tab by using the supplied // transition and foreground flag to figure out how it was opened. - int DetermineInsertionIndex(content::PageTransition transition, + int DetermineInsertionIndex(ui::PageTransition transition, bool foreground); // Determine where to shift selection after a tab is closed. diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc index 445f2be..b344bd4 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc @@ -757,7 +757,7 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) { static int GetInsertionIndex(TabStripModel* tabstrip) { return tabstrip->order_controller()->DetermineInsertionIndex( - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); } static void InsertWebContentses(TabStripModel* tabstrip, @@ -838,7 +838,7 @@ TEST_F(TabStripModelTest, TestInsertionIndexDetermination) { // opener tab. WebContents* fg_link_contents = CreateWebContents(); int insert_index = tabstrip.order_controller()->DetermineInsertionIndex( - content::PAGE_TRANSITION_LINK, true); + ui::PAGE_TRANSITION_LINK, true); EXPECT_EQ(1, insert_index); tabstrip.InsertWebContentsAt(insert_index, fg_link_contents, TabStripModel::ADD_ACTIVE | @@ -853,7 +853,7 @@ TEST_F(TabStripModelTest, TestInsertionIndexDetermination) { // Now open a new empty tab. It should open at the end of the strip. WebContents* fg_nonlink_contents = CreateWebContents(); insert_index = tabstrip.order_controller()->DetermineInsertionIndex( - content::PAGE_TRANSITION_AUTO_BOOKMARK, true); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, true); EXPECT_EQ(tabstrip.count(), insert_index); // We break the opener relationship... tabstrip.InsertWebContentsAt(insert_index, @@ -1233,13 +1233,13 @@ TEST_F(TabStripModelTest, AddWebContents_MiddleClickLinksAndClose) { // Open the Home Page. WebContents* homepage_contents = CreateWebContents(); tabstrip.AddWebContents( - homepage_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + homepage_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Open some other tab, by user typing. WebContents* typed_page_contents = CreateWebContents(); tabstrip.AddWebContents( - typed_page_contents, -1, content::PAGE_TRANSITION_TYPED, + typed_page_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(2, tabstrip.count()); @@ -1251,15 +1251,15 @@ TEST_F(TabStripModelTest, AddWebContents_MiddleClickLinksAndClose) { // page. WebContents* middle_click_contents1 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents1, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents1, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); WebContents* middle_click_contents2 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents2, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents2, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); WebContents* middle_click_contents3 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents3, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents3, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); EXPECT_EQ(5, tabstrip.count()); @@ -1303,13 +1303,13 @@ TEST_F(TabStripModelTest, AddWebContents_LeftClickPopup) { // Open the Home Page. WebContents* homepage_contents = CreateWebContents(); tabstrip.AddWebContents( - homepage_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + homepage_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Open some other tab, by user typing. WebContents* typed_page_contents = CreateWebContents(); tabstrip.AddWebContents( - typed_page_contents, -1, content::PAGE_TRANSITION_TYPED, + typed_page_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(2, tabstrip.count()); @@ -1320,7 +1320,7 @@ TEST_F(TabStripModelTest, AddWebContents_LeftClickPopup) { // Open a tab by simulating a left click on a link that opens in a new tab. WebContents* left_click_contents = CreateWebContents(); tabstrip.AddWebContents(left_click_contents, -1, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_ACTIVE); // Verify the state meets our expectations. @@ -1354,13 +1354,13 @@ TEST_F(TabStripModelTest, AddWebContents_CreateNewBlankTab) { // Open the Home Page. WebContents* homepage_contents = CreateWebContents(); tabstrip.AddWebContents( - homepage_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + homepage_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Open some other tab, by user typing. WebContents* typed_page_contents = CreateWebContents(); tabstrip.AddWebContents( - typed_page_contents, -1, content::PAGE_TRANSITION_TYPED, + typed_page_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(2, tabstrip.count()); @@ -1371,7 +1371,7 @@ TEST_F(TabStripModelTest, AddWebContents_CreateNewBlankTab) { // Open a new blank tab in the foreground. WebContents* new_blank_contents = CreateWebContents(); tabstrip.AddWebContents(new_blank_contents, -1, - content::PAGE_TRANSITION_TYPED, + ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); // Verify the state of the tabstrip. @@ -1383,11 +1383,11 @@ TEST_F(TabStripModelTest, AddWebContents_CreateNewBlankTab) { // Now open a couple more blank tabs in the background. WebContents* background_blank_contents1 = CreateWebContents(); tabstrip.AddWebContents( - background_blank_contents1, -1, content::PAGE_TRANSITION_TYPED, + background_blank_contents1, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_NONE); WebContents* background_blank_contents2 = CreateWebContents(); tabstrip.AddWebContents( - background_blank_contents2, -1, content::PAGE_TRANSITION_GENERATED, + background_blank_contents2, -1, ui::PAGE_TRANSITION_GENERATED, TabStripModel::ADD_NONE); EXPECT_EQ(5, tabstrip.count()); EXPECT_EQ(homepage_contents, tabstrip.GetWebContentsAt(0)); @@ -1410,13 +1410,13 @@ TEST_F(TabStripModelTest, AddWebContents_ForgetOpeners) { // Open the Home Page WebContents* homepage_contents = CreateWebContents(); tabstrip.AddWebContents( - homepage_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + homepage_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Open some other tab, by user typing. WebContents* typed_page_contents = CreateWebContents(); tabstrip.AddWebContents( - typed_page_contents, -1, content::PAGE_TRANSITION_TYPED, + typed_page_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(2, tabstrip.count()); @@ -1428,15 +1428,15 @@ TEST_F(TabStripModelTest, AddWebContents_ForgetOpeners) { // page. WebContents* middle_click_contents1 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents1, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents1, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); WebContents* middle_click_contents2 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents2, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents2, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); WebContents* middle_click_contents3 = CreateWebContents(); tabstrip.AddWebContents( - middle_click_contents3, -1, content::PAGE_TRANSITION_LINK, + middle_click_contents3, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); // Break out of the context by selecting a tab in a different context. @@ -1475,13 +1475,13 @@ TEST_F(TabStripModelTest, AppendContentsReselectionTest) { // Open the Home Page. WebContents* homepage_contents = CreateWebContents(); tabstrip.AddWebContents( - homepage_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + homepage_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Open some other tab, by user typing. WebContents* typed_page_contents = CreateWebContents(); tabstrip.AddWebContents( - typed_page_contents, -1, content::PAGE_TRANSITION_TYPED, + typed_page_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_NONE); // The selected tab should still be the first. @@ -1507,15 +1507,15 @@ TEST_F(TabStripModelTest, ReselectionConsidersChildrenTest) { // Open page A WebContents* page_a_contents = CreateWebContents(); strip.AddWebContents( - page_a_contents, -1, content::PAGE_TRANSITION_AUTO_BOOKMARK, + page_a_contents, -1, ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); // Simulate middle click to open page A.A and A.B WebContents* page_a_a_contents = CreateWebContents(); - strip.AddWebContents(page_a_a_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_a_a_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); WebContents* page_a_b_contents = CreateWebContents(); - strip.AddWebContents(page_a_b_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_a_b_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); // Select page A.A @@ -1524,7 +1524,7 @@ TEST_F(TabStripModelTest, ReselectionConsidersChildrenTest) { // Simulate a middle click to open page A.A.A WebContents* page_a_a_a_contents = CreateWebContents(); - strip.AddWebContents(page_a_a_a_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_a_a_a_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); EXPECT_EQ(page_a_a_a_contents, strip.GetWebContentsAt(2)); @@ -1558,18 +1558,18 @@ TEST_F(TabStripModelTest, AddWebContents_NewTabAtEndOfStripInheritsGroup) { // Open page A WebContents* page_a_contents = CreateWebContents(); strip.AddWebContents(page_a_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); // Open pages B, C and D in the background from links on page A... WebContents* page_b_contents = CreateWebContents(); WebContents* page_c_contents = CreateWebContents(); WebContents* page_d_contents = CreateWebContents(); - strip.AddWebContents(page_b_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_b_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_c_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_c_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_d_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_d_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); // Switch to page B's tab. @@ -1577,7 +1577,7 @@ TEST_F(TabStripModelTest, AddWebContents_NewTabAtEndOfStripInheritsGroup) { // Open a New Tab at the end of the strip (simulate Ctrl+T) WebContents* new_contents = CreateWebContents(); - strip.AddWebContents(new_contents, -1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(new_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(4, strip.GetIndexOfWebContents(new_contents)); @@ -1593,7 +1593,7 @@ TEST_F(TabStripModelTest, AddWebContents_NewTabAtEndOfStripInheritsGroup) { // This is like typing a URL in the address bar and pressing Alt+Enter. The // behavior should be the same as above. WebContents* page_e_contents = CreateWebContents(); - strip.AddWebContents(page_e_contents, -1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(page_e_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); EXPECT_EQ(4, strip.GetIndexOfWebContents(page_e_contents)); @@ -1610,7 +1610,7 @@ TEST_F(TabStripModelTest, AddWebContents_NewTabAtEndOfStripInheritsGroup) { // and the one that was active when the gesture was performed. WebContents* page_f_contents = CreateWebContents(); strip.AddWebContents(page_f_contents, -1, - content::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PAGE_TRANSITION_AUTO_BOOKMARK, TabStripModel::ADD_ACTIVE); EXPECT_EQ(4, strip.GetIndexOfWebContents(page_f_contents)); @@ -1636,36 +1636,36 @@ TEST_F(TabStripModelTest, NavigationForgetsOpeners) { // Open page A WebContents* page_a_contents = CreateWebContents(); strip.AddWebContents(page_a_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); // Open pages B, C and D in the background from links on page A... WebContents* page_b_contents = CreateWebContents(); WebContents* page_c_contents = CreateWebContents(); WebContents* page_d_contents = CreateWebContents(); - strip.AddWebContents(page_b_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_b_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_c_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_c_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_d_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_d_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); // Open page E in a different opener group from page A. WebContents* page_e_contents = CreateWebContents(); strip.AddWebContents(page_e_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_NONE); // Tell the TabStripModel that we are navigating page D via a link click. strip.ActivateTabAt(3, true); - strip.TabNavigating(page_d_contents, content::PAGE_TRANSITION_LINK); + strip.TabNavigating(page_d_contents, ui::PAGE_TRANSITION_LINK); // Close page D, page C should be selected. (part of same group). strip.CloseWebContentsAt(3, TabStripModel::CLOSE_NONE); EXPECT_EQ(2, strip.active_index()); // Tell the TabStripModel that we are navigating in page C via a bookmark. - strip.TabNavigating(page_c_contents, content::PAGE_TRANSITION_AUTO_BOOKMARK); + strip.TabNavigating(page_c_contents, ui::PAGE_TRANSITION_AUTO_BOOKMARK); // Close page C, page E should be selected. (C is no longer part of the // A-B-C-D group, selection moves to the right). @@ -1687,17 +1687,17 @@ TEST_F(TabStripModelTest, NavigationForgettingDoesntAffectNewTab) { // opened. WebContents* page_a_contents = CreateWebContents(); strip.AddWebContents(page_a_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); WebContents* page_b_contents = CreateWebContents(); WebContents* page_c_contents = CreateWebContents(); WebContents* page_d_contents = CreateWebContents(); - strip.AddWebContents(page_b_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_b_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_c_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_c_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); - strip.AddWebContents(page_d_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_d_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); strip.ActivateTabAt(2, true); @@ -1708,7 +1708,7 @@ TEST_F(TabStripModelTest, NavigationForgettingDoesntAffectNewTab) { // Now simulate opening a new tab at the end of the TabStrip. WebContents* new_contents1 = CreateWebContents(); - strip.AddWebContents(new_contents1, -1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(new_contents1, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); // At this point, if we close this tab the last selected one should be @@ -1722,7 +1722,7 @@ TEST_F(TabStripModelTest, NavigationForgettingDoesntAffectNewTab) { // Open a new tab again. WebContents* new_contents2 = CreateWebContents(); - strip.AddWebContents(new_contents2, -1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(new_contents2, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); // Now select the first tab. @@ -2113,7 +2113,7 @@ TEST_F(TabStripModelTest, ReplaceSendsSelected) { TabStripModel strip(&delegate, profile()); WebContents* first_contents = CreateWebContents(); - strip.AddWebContents(first_contents, -1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(first_contents, -1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_ACTIVE); MockTabStripModelObserver tabstrip_observer(&strip); @@ -2138,7 +2138,7 @@ TEST_F(TabStripModelTest, ReplaceSendsSelected) { // Now add another tab and replace it, making sure we don't get a selected // event this time. WebContents* third_contents = CreateWebContents(); - strip.AddWebContents(third_contents, 1, content::PAGE_TRANSITION_TYPED, + strip.AddWebContents(third_contents, 1, ui::PAGE_TRANSITION_TYPED, TabStripModel::ADD_NONE); tabstrip_observer.ClearStates(); @@ -2331,19 +2331,19 @@ TEST_F(TabStripModelTest, MoveSelectedTabsTo_ForgetGroups) { // Open page A as a new tab and then A1 in the background from A. WebContents* page_a_contents = CreateWebContents(); strip.AddWebContents(page_a_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); WebContents* page_a1_contents = CreateWebContents(); - strip.AddWebContents(page_a1_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_a1_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); // Likewise, open pages B and B1. WebContents* page_b_contents = CreateWebContents(); strip.AddWebContents(page_b_contents, -1, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, TabStripModel::ADD_ACTIVE); WebContents* page_b1_contents = CreateWebContents(); - strip.AddWebContents(page_b1_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_b1_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); EXPECT_EQ(page_a_contents, strip.GetWebContentsAt(0)); @@ -2356,7 +2356,7 @@ TEST_F(TabStripModelTest, MoveSelectedTabsTo_ForgetGroups) { // Open page B2 in the background from B. It should end up after B. WebContents* page_b2_contents = CreateWebContents(); - strip.AddWebContents(page_b2_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_b2_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); EXPECT_EQ(page_b_contents, strip.GetWebContentsAt(0)); EXPECT_EQ(page_b2_contents, strip.GetWebContentsAt(1)); @@ -2370,7 +2370,7 @@ TEST_F(TabStripModelTest, MoveSelectedTabsTo_ForgetGroups) { // Open page A2 in the background from A. It should end up after A1. WebContents* page_a2_contents = CreateWebContents(); - strip.AddWebContents(page_a2_contents, -1, content::PAGE_TRANSITION_LINK, + strip.AddWebContents(page_a2_contents, -1, ui::PAGE_TRANSITION_LINK, TabStripModel::ADD_NONE); EXPECT_EQ(page_b_contents, strip.GetWebContentsAt(0)); EXPECT_EQ(page_b2_contents, strip.GetWebContentsAt(1)); diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc index af2de92..c80a147 100644 --- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc +++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc @@ -264,9 +264,9 @@ bool ToolbarModelImpl::WouldOmitURLDueToOriginChip() const { visible_entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL && !pending_entry->GetExtraData(kInterstitialShownKey, &unused)) pending_entry->SetExtraData(kInterstitialShownKey, base::string16()); - const content::PageTransition transition_type = + const ui::PageTransition transition_type = pending_entry->GetTransitionType(); - if ((transition_type & content::PAGE_TRANSITION_TYPED) != 0 && + if ((transition_type & ui::PAGE_TRANSITION_TYPED) != 0 && !pending_entry->GetExtraData(kInterstitialShownKey, &unused)) return false; } diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc index 063b171..a3f534e 100644 --- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc +++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc @@ -199,7 +199,7 @@ void ToolbarModelTest::NavigateAndCheckText( // Check while loading. content::NavigationController* controller = &browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); - controller->LoadURL(url, content::Referrer(), content::PAGE_TRANSITION_LINK, + controller->LoadURL(url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); ToolbarModel* toolbar_model = browser()->toolbar_model(); EXPECT_EQ(expected_text, toolbar_model->GetText()); @@ -331,7 +331,7 @@ TEST_F(ToolbarModelTest, SearchTermsWhileLoading) { content::NavigationController* controller = &browser()->tab_strip_model()->GetWebContentsAt(0)->GetController(); controller->LoadURL(GURL("https://google.com/search?q=tractor+supply&espv=1"), - content::Referrer(), content::PAGE_TRANSITION_LINK, + content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); ToolbarModel* toolbar_model = browser()->toolbar_model(); controller->GetVisibleEntry()->GetSSL().security_style = diff --git a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc index 0217162..e028595 100644 --- a/chrome/browser/ui/views/accessibility/invert_bubble_view.cc +++ b/chrome/browser/ui/views/accessibility/invert_bubble_view.cc @@ -147,7 +147,7 @@ void InvertBubbleView::OpenLink(const std::string& url, int event_flags) { content::OpenURLParams params( GURL(url), content::Referrer(), disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); browser_->OpenURL(params); } diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc index 5d9bc99..f09a377 100644 --- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc +++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_header_panel.cc @@ -173,7 +173,7 @@ void AppInfoHeaderPanel::ShowAppInWebStore() const { net::AppendQueryParameter(url, extension_urls::kWebstoreSourceField, extension_urls::kLaunchSourceAppListInfoDialog), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); chrome::Navigate(¶ms); } @@ -198,7 +198,7 @@ void AppInfoHeaderPanel::DisplayLicenses() { GURL about_page = extensions::ManifestURL::GetAboutPage(imported_module); DCHECK(about_page != GURL::EmptyGURL()); chrome::NavigateParams params( - profile_, about_page, content::PAGE_TRANSITION_LINK); + profile_, about_page, ui::PAGE_TRANSITION_LINK); chrome::Navigate(¶ms); } diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 5271b0d..8b044e7 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -60,7 +60,6 @@ #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension.h" #include "extensions/common/extension_set.h" @@ -69,6 +68,7 @@ #include "ui/base/dragdrop/drag_utils.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/theme_provider.h" #include "ui/base/window_open_disposition.h" @@ -1269,7 +1269,7 @@ void BookmarkBarView::ButtonPressed(views::Button* sender, OpenURLParams params(GURL(chrome::kChromeUIAppsURL), Referrer(), disposition_from_event_flags, - content::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false); page_navigator_->OpenURL(params); RecordBookmarkAppsPageOpen(GetBookmarkLaunchLocation()); @@ -1292,7 +1292,7 @@ void BookmarkBarView::ButtonPressed(views::Button* sender, RecordAppLaunch(browser_->profile(), node->url()); OpenURLParams params( node->url(), Referrer(), disposition_from_event_flags, - content::PAGE_TRANSITION_AUTO_BOOKMARK, false); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false); page_navigator_->OpenURL(params); } else { chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, diff --git a/chrome/browser/ui/views/conflicting_module_view_win.cc b/chrome/browser/ui/views/conflicting_module_view_win.cc index 690c477..f33c7c5 100644 --- a/chrome/browser/ui/views/conflicting_module_view_win.cc +++ b/chrome/browser/ui/views/conflicting_module_view_win.cc @@ -197,7 +197,7 @@ void ConflictingModuleView::ButtonPressed(views::Button* sender, content::OpenURLParams(help_center_url_, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); diff --git a/chrome/browser/ui/views/download/download_feedback_dialog_view.cc b/chrome/browser/ui/views/download/download_feedback_dialog_view.cc index d2dff57..bcca84af 100644 --- a/chrome/browser/ui/views/download/download_feedback_dialog_view.cc +++ b/chrome/browser/ui/views/download/download_feedback_dialog_view.cc @@ -155,6 +155,6 @@ void DownloadFeedbackDialogView::LinkClicked( GURL(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)), content::Referrer(), disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); navigator_->OpenURL(params); } diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc index 14537d0..6b5368e 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc @@ -773,7 +773,7 @@ void ExtensionInstallDialogView::LinkClicked(views::Link* source, prompt_->extension()->id()); OpenURLParams params( store_url, Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); navigator_->OpenURL(params); GetWidget()->Close(); diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc index db19d7a..967c1f8 100644 --- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc +++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc @@ -67,7 +67,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) { chrome::Find(browser()); // Open another tab (tab B). - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); chrome::Find(browser()); EXPECT_TRUE(ui_test_utils::IsViewFocused(browser(), @@ -184,7 +184,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, DISABLED_SelectionRestoreOnTabSwitch) { content::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Show the Find bar. @@ -250,7 +250,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, MAYBE_FocusRestoreOnTabSwitch) { content::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); - chrome::AddSelectedTabWithURL(browser(), url, content::PAGE_TRANSITION_TYPED); + chrome::AddSelectedTabWithURL(browser(), url, ui::PAGE_TRANSITION_TYPED); observer.Wait(); // Make sure Find box is open. diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc index 0ca335e..b54ec16 100644 --- a/chrome/browser/ui/views/frame/global_menu_bar_x11.cc +++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.cc @@ -771,7 +771,7 @@ void GlobalMenuBarX11::OnHistoryItemActivated(DbusmenuMenuitem* sender, item->url, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_AUTO_BOOKMARK, + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); } } diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 430f333..2d5a240 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -1257,7 +1257,7 @@ WindowOpenDisposition LocationBarView::GetWindowOpenDisposition() const { return disposition(); } -content::PageTransition LocationBarView::GetPageTransition() const { +ui::PageTransition LocationBarView::GetPageTransition() const { return transition(); } diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h index d7752ac..674e831 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h @@ -342,7 +342,7 @@ class LocationBarView : public LocationBar, virtual void ShowFirstRunBubble() OVERRIDE; virtual GURL GetDestinationURL() const OVERRIDE; virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; - virtual content::PageTransition GetPageTransition() const OVERRIDE; + virtual ui::PageTransition GetPageTransition() const OVERRIDE; virtual void AcceptInput() OVERRIDE; virtual void FocusSearch() OVERRIDE; virtual void UpdateContentSettingsIcons() OVERRIDE; diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc index f785c2f..93cd822 100644 --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc @@ -273,7 +273,7 @@ void ZoomBubbleView::ButtonPressed(views::Button* sender, browser, GURL(base::StringPrintf("chrome://extensions?id=%s", extension_info_.id.c_str())), - content::PAGE_TRANSITION_FROM_API); + ui::PAGE_TRANSITION_FROM_API); } else { chrome_page_zoom::Zoom(web_contents_, content::PAGE_ZOOM_RESET); } diff --git a/chrome/browser/ui/views/network_profile_bubble_view.cc b/chrome/browser/ui/views/network_profile_bubble_view.cc index fd816b6..cdf3354 100644 --- a/chrome/browser/ui/views/network_profile_bubble_view.cc +++ b/chrome/browser/ui/views/network_profile_bubble_view.cc @@ -131,7 +131,7 @@ void NetworkProfileBubbleView::LinkClicked(views::Link* source, "common-problems-and-solutions#network_profile"), content::Referrer(), disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); navigator_->OpenURL(params); // If the user interacted with the bubble we don't reduce the number of diff --git a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc index 5fd284a..452385f 100644 --- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc +++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc @@ -214,7 +214,7 @@ void OutdatedUpgradeBubbleView::HandleButtonPressed(views::Button* sender) { navigator_->OpenURL(content::OpenURLParams(GURL(kDownloadChromeUrl), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); #if defined(OS_WIN) } else { diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc index 9aa2aa8..258611f 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view_browsertest.cc @@ -277,7 +277,7 @@ IN_PROC_BROWSER_TEST_F(ManagePasswordsBubbleViewTest, TwoTabsWithBubble) { SetupPendingPassword(); EXPECT_TRUE(ManagePasswordsBubbleView::IsShowing()); // Set up the second tab. - AddTabAtIndex(0, GURL("chrome://newtab"), content::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, GURL("chrome://newtab"), ui::PAGE_TRANSITION_TYPED); EXPECT_FALSE(ManagePasswordsBubbleView::IsShowing()); ManagePasswordsBubbleView::ShowBubble( browser()->tab_strip_model()->GetActiveWebContents(), diff --git a/chrome/browser/ui/views/profiles/profile_reset_bubble_view.cc b/chrome/browser/ui/views/profiles/profile_reset_bubble_view.cc index 2b039f2..0cf103e 100644 --- a/chrome/browser/ui/views/profiles/profile_reset_bubble_view.cc +++ b/chrome/browser/ui/views/profiles/profile_reset_bubble_view.cc @@ -423,7 +423,7 @@ void ProfileResetBubbleView::LinkClicked(views::Link* source, int flags) { base::UserMetricsAction("SettingsResetBubble.LearnMore")); navigator_->OpenURL(content::OpenURLParams( GURL(chrome::kResetProfileSettingsLearnMoreURL), content::Referrer(), - NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); + NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false)); } void ProfileResetBubbleView::CloseBubbleView() { diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc index b14de22..173455e 100644 --- a/chrome/browser/ui/views/sad_tab_view.cc +++ b/chrome/browser/ui/views/sad_tab_view.cc @@ -178,7 +178,7 @@ void SadTabView::LinkClicked(views::Link* source, int event_flags) { chrome::kCrashReasonURL : chrome::kKillReasonURL); OpenURLParams params( help_url, content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); web_contents_->OpenURL(params); } else if (source == feedback_link_) { chrome::ShowFeedbackPage( diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc index 9919fdb..0e97597 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc @@ -333,7 +333,7 @@ IN_PROC_BROWSER_TEST_F(SelectFileDialogExtensionBrowserTest, // Open a singleton tab in background. chrome::NavigateParams p(browser(), GURL("http://www.google.com"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); p.window_action = chrome::NavigateParams::SHOW_WINDOW; p.disposition = SINGLETON_TAB; chrome::Navigate(&p); diff --git a/chrome/browser/ui/views/session_crashed_bubble_view.cc b/chrome/browser/ui/views/session_crashed_bubble_view.cc index ef43a73..fbccada 100644 --- a/chrome/browser/ui/views/session_crashed_bubble_view.cc +++ b/chrome/browser/ui/views/session_crashed_bubble_view.cc @@ -375,7 +375,7 @@ void SessionCrashedBubbleView::StyledLabelLinkClicked(const gfx::Range& range, GURL("https://support.google.com/chrome/answer/96817"), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_HELP); } diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc b/chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc index 56dd4fd5..4d23f07 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc +++ b/chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc @@ -151,8 +151,8 @@ class SSLClientCertificateSelectorMultiTabTest // Also calls SetUpOnIOThread. SSLClientCertificateSelectorTest::SetUpOnMainThread(); - AddTabAtIndex(1, GURL("about:blank"), content::PAGE_TRANSITION_LINK); - AddTabAtIndex(2, GURL("about:blank"), content::PAGE_TRANSITION_LINK); + AddTabAtIndex(1, GURL("about:blank"), ui::PAGE_TRANSITION_LINK); + AddTabAtIndex(2, GURL("about:blank"), ui::PAGE_TRANSITION_LINK); ASSERT_TRUE(NULL != browser()->tab_strip_model()->GetWebContentsAt(0)); ASSERT_TRUE(NULL != browser()->tab_strip_model()->GetWebContentsAt(1)); ASSERT_TRUE(NULL != browser()->tab_strip_model()->GetWebContentsAt(2)); diff --git a/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc b/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc index 468b553..59dabbc 100644 --- a/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc +++ b/chrome/browser/ui/views/sync/one_click_signin_bubble_view_unittest.cc @@ -9,7 +9,6 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h" #include "chrome/test/base/ui_test_utils.h" -#include "content/public/common/page_transition_types.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/test/views_test_base.h" #include "ui/views/widget/widget.h" diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc index 3d70bab..3fffef5 100644 --- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc +++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc @@ -252,7 +252,7 @@ void ProfileSigninConfirmationDialogViews::StyledLabelLinkClicked( chrome::NavigateParams params( browser_, GURL("http://support.google.com/chromeos/bin/answer.py?answer=1331549"), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); params.disposition = NEW_POPUP; params.window_action = chrome::NavigateParams::SHOW_WINDOW; chrome::Navigate(¶ms); diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc index 26e82b2..ec84d5f 100644 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc @@ -339,7 +339,7 @@ void BrowserTabStripController::OnDropIndexUpdate(int index, void BrowserTabStripController::PerformDrop(bool drop_before, int index, const GURL& url) { - chrome::NavigateParams params(browser_, url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(browser_, url, ui::PAGE_TRANSITION_LINK); params.tabstrip_index = index; if (drop_before) { diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc index 90588a9..8aff6d0 100644 --- a/chrome/browser/ui/views/translate/translate_bubble_view.cc +++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc @@ -365,7 +365,7 @@ void TranslateBubbleView::HandleLinkClicked( url, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); break; } diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc index dfd5c07..aabc7aa 100644 --- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc +++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc @@ -405,7 +405,7 @@ void WebsiteSettingsPopupView::LinkClicked(views::Link* source, content::OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } } diff --git a/chrome/browser/ui/webui/chrome_web_contents_handler.cc b/chrome/browser/ui/webui/chrome_web_contents_handler.cc index 36c632b..c733afe 100644 --- a/chrome/browser/ui/webui/chrome_web_contents_handler.cc +++ b/chrome/browser/ui/webui/chrome_web_contents_handler.cc @@ -53,7 +53,7 @@ WebContents* ChromeWebContentsHandler::OpenURLFromTab( nav_params.referrer = params.referrer; if (source && source->IsCrashed() && params.disposition == CURRENT_TAB && - params.transition == content::PAGE_TRANSITION_LINK) { + params.transition == ui::PAGE_TRANSITION_LINK) { nav_params.disposition = NEW_FOREGROUND_TAB; } else { nav_params.disposition = params.disposition; diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc index 845b425..2423864 100644 --- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc +++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc @@ -363,7 +363,7 @@ void KeyboardOverlayHandler::OpenLearnMorePage(const base::ListValue* args) { content::OpenURLParams(GURL(kLearnMoreURL), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc index 4c1bd51..b1c40c6 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc @@ -637,7 +637,7 @@ MobileSetupUI::MobileSetupUI(content::WebUI* web_ui) void MobileSetupUI::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { if (render_frame_host->GetFrameName() != "paymentForm") return; diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h index b705ff9..5f4c5b1 100644 --- a/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h +++ b/chrome/browser/ui/webui/chromeos/mobile_setup_ui.h @@ -22,7 +22,7 @@ class MobileSetupUI : public content::WebUIController, virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; virtual void DidFailProvisionalLoad( content::RenderFrameHost* render_frame_host, const GURL& validated_url, diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc index 1b7244d..a2b05b9 100644 --- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc +++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc @@ -48,7 +48,7 @@ ConstrainedWebDialogDelegateBase::ConstrainedWebDialogDelegateBase( web_contents_->GetController().LoadURL(delegate->GetDialogContentURL(), content::Referrer(), - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc index 4feb3b3..2564a05 100644 --- a/chrome/browser/ui/webui/inspect_ui.cc +++ b/chrome/browser/ui/webui/inspect_ui.cc @@ -349,7 +349,7 @@ void InspectUI::InspectBrowserWithCustomFrontend( content::OpenURLParams(frontend_url, content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_AUTO_TOPLEVEL, + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, false)); // Install devtools bindings. diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc index 255188d..a76e549 100644 --- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc +++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc @@ -36,12 +36,12 @@ #include "components/signin/core/browser/signin_manager_base.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_ui.h" -#include "content/public/common/page_transition_types.h" #include "net/base/host_port_pair.h" #include "net/base/net_util.h" #include "net/base/url_util.h" #include "net/http/http_status_code.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/base/page_transition_types.h" #if defined(ENABLE_FULL_PRINTING) && !defined(OS_CHROMEOS) #define CLOUD_PRINT_CONNECTOR_UI_AVAILABLE @@ -291,7 +291,7 @@ void LocalDiscoveryUIHandler::HandleOpenCloudPrintURL( chrome::AddSelectedTabWithURL(browser, cloud_devices::GetCloudPrintManageDeviceURL(id), - content::PAGE_TRANSITION_FROM_API); + ui::PAGE_TRANSITION_FROM_API); } void LocalDiscoveryUIHandler::HandleShowSyncUI( @@ -305,7 +305,7 @@ void LocalDiscoveryUIHandler::HandleShowSyncUI( browser->OpenURL( content::OpenURLParams(url, content::Referrer(), SINGLETON_TAB, - content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false)); } void LocalDiscoveryUIHandler::StartRegisterHTTP( @@ -686,7 +686,7 @@ void LocalDiscoveryUIHandler::ShowCloudPrintSetupDialog( CloudPrintProxyServiceFactory::GetForProfile(profile)->proxy_id()), content::Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); web_ui()->GetWebContents()->OpenURL(params); } diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc index 9a06e98..a0426ba 100644 --- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc @@ -62,7 +62,7 @@ MostVisitedHandler::~MostVisitedHandler() { web_ui()->GetWebContents()->GetController().GetLastCommittedEntry(); if (entry && (entry->GetURL() != ntp_url)) { action_id = - content::PageTransitionStripQualifier(entry->GetTransitionType()); + ui::PageTransitionStripQualifier(entry->GetTransitionType()); } UMA_HISTOGRAM_ENUMERATION("NewTabPage.MostVisitedAction", action_id, diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index af6dda1..e8e4e80 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -90,7 +90,7 @@ NewTabUI::NewTabUI(content::WebUI* web_ui) // We count all link clicks as AUTO_BOOKMARK, so that site can be ranked more // highly. Note this means we're including clicks on not only most visited // thumbnails, but also clicks on recently bookmarked. - web_ui->SetLinkTransitionType(content::PAGE_TRANSITION_AUTO_BOOKMARK); + web_ui->SetLinkTransitionType(ui::PAGE_TRANSITION_AUTO_BOOKMARK); Profile* profile = GetProfile(); if (!profile->IsOffTheRecord()) { diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc index 5238c49..a7873aa 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc @@ -58,7 +58,7 @@ IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, DISABLED_LoadNTPInExistingProcess) { content::RenderProcessHostWatcher::WATCH_FOR_HOST_DESTRUCTION); browser()->OpenURL(OpenURLParams( test_server()->GetURL("files/title1.html"), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); process_exited_observer.Wait(); } @@ -113,7 +113,7 @@ IN_PROC_BROWSER_TEST_F(NewTabUIBrowserTest, DISABLED_ChromeHangInNTP) { chrome::NewTab(browser()); browser()->OpenURL(OpenURLParams( GURL(content::kChromeUIHangURL), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); } class NewTabUIProcessPerTabTest : public NewTabUIBrowserTest { @@ -147,6 +147,6 @@ IN_PROC_BROWSER_TEST_F(NewTabUIProcessPerTabTest, NavBeforeNTPCommits) { browser()->tab_strip_model()->GetActiveWebContents()); browser()->OpenURL(OpenURLParams( GURL("data:text/html,hello world"), Referrer(), CURRENT_TAB, - content::PAGE_TRANSITION_TYPED, false)); + ui::PAGE_TRANSITION_TYPED, false)); observer.Wait(); } diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc index ba02ac8..4d606fe 100644 --- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc +++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc @@ -33,7 +33,7 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" using base::UserMetricsAction; @@ -52,7 +52,7 @@ SuggestionsHandler::~SuggestionsHandler() { web_ui()->GetWebContents()->GetController().GetLastCommittedEntry(); if (entry && (entry->GetURL() != ntp_url)) { action_id = - content::PageTransitionStripQualifier(entry->GetTransitionType()); + ui::PageTransitionStripQualifier(entry->GetTransitionType()); } UMA_HISTOGRAM_ENUMERATION("NewTabPage.SuggestedSitesAction", action_id, diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_linux.cc b/chrome/browser/ui/webui/options/advanced_options_utils_linux.cc index 799dbe2..0f7c4b7 100644 --- a/chrome/browser/ui/webui/options/advanced_options_utils_linux.cc +++ b/chrome/browser/ui/webui/options/advanced_options_utils_linux.cc @@ -52,7 +52,7 @@ void ShowLinuxProxyConfigUrl(int render_process_id, int render_view_id) { LOG(ERROR) << "Could not find " << name << " network settings in $PATH"; OpenURLParams params( GURL(kLinuxProxyConfigUrl), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, false); + ui::PAGE_TRANSITION_LINK, false); WebContents* web_contents = tab_util::GetWebContentsByID(render_process_id, render_view_id); diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index 03fcbe3..4af7dda 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -1594,7 +1594,7 @@ void BrowserOptionsHandler::ShowCloudPrintDevicesPage( // Navigate in current tab to devices page. OpenURLParams params( GURL(chrome::kChromeUIDevicesURL), Referrer(), - CURRENT_TAB, content::PAGE_TRANSITION_LINK, false); + CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false); web_ui()->GetWebContents()->OpenURL(params); } diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc index cd4454f..561670b 100644 --- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc @@ -240,7 +240,7 @@ void CrosLanguageOptionsHandler::InputMethodOptionsOpenCallback( content::OpenURLParams params(ime->options_page_url(), content::Referrer(), SINGLETON_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false); browser->OpenURL(params); browser->window()->Show(); diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index f78549f..8fd7808 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -1022,7 +1022,7 @@ void PrintPreviewHandler::HandleManageCloudPrint( cloud_devices::GetCloudPrintRelativeURL("manage.html"), content::Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); } @@ -1119,7 +1119,7 @@ void PrintPreviewHandler::HandleForceOpenNewTab(const base::ListValue* args) { return; chrome::AddSelectedTabWithURL(browser, GURL(url), - content::PAGE_TRANSITION_LINK); + ui::PAGE_TRANSITION_LINK); } void PrintPreviewHandler::SendInitialSettings( diff --git a/chrome/browser/ui/webui/signin/inline_login_handler.cc b/chrome/browser/ui/webui/signin/inline_login_handler.cc index 67bc079..6a16e1e 100644 --- a/chrome/browser/ui/webui/signin/inline_login_handler.cc +++ b/chrome/browser/ui/webui/signin/inline_login_handler.cc @@ -120,7 +120,7 @@ void InlineLoginHandler::HandleSwitchToFullTabMessage( Profile::FromWebUI(web_ui()), net::AppendOrReplaceQueryParameter( main_frame_url, signin::kSignInPromoQueryKeyConstrained, "0"), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); chrome::Navigate(¶ms); web_ui()->CallJavascriptFunction("inline.login.closeDialog"); diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc index 6a4a169..084c30b 100644 --- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc +++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc @@ -240,7 +240,7 @@ bool InlineLoginHandlerImpl::HandleContextMenu( void InlineLoginHandlerImpl::DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) { + ui::PageTransition transition_type) { if (!web_contents()) return; diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.h b/chrome/browser/ui/webui/signin/inline_login_handler_impl.h index 9f3c44d..b0a0abc 100644 --- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.h +++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.h @@ -51,7 +51,7 @@ class InlineLoginHandlerImpl : public InlineLoginHandler, virtual void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, - content::PageTransition transition_type) OVERRIDE; + ui::PageTransition transition_type) OVERRIDE; // True if the user has navigated to untrusted domains during the signin // process. diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc index da403f8..1389a0f 100644 --- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc +++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc @@ -199,10 +199,10 @@ class TestWebUI : public content::WebUI { return temp_string_; } virtual void OverrideTitle(const base::string16& title) OVERRIDE {} - virtual content::PageTransition GetLinkTransitionType() const OVERRIDE { - return content::PAGE_TRANSITION_LINK; + virtual ui::PageTransition GetLinkTransitionType() const OVERRIDE { + return ui::PAGE_TRANSITION_LINK; } - virtual void SetLinkTransitionType(content::PageTransition type) OVERRIDE {} + virtual void SetLinkTransitionType(ui::PageTransition type) OVERRIDE {} virtual int GetBindings() const OVERRIDE { return 0; } diff --git a/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc b/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc index ac28b7d..98a87b4 100644 --- a/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc +++ b/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc @@ -66,7 +66,7 @@ TEST_F(WebDialogWebContentsDelegateTest, DoNothingMethodsTest) { EXPECT_TRUE(test_web_contents_delegate_->IsPopupOrPanel(NULL)); history::HistoryAddPageArgs should_add_args( GURL(), base::Time::Now(), 0, 0, GURL(), history::RedirectList(), - content::PAGE_TRANSITION_TYPED, history::SOURCE_SYNCED, false); + ui::PAGE_TRANSITION_TYPED, history::SOURCE_SYNCED, false); test_web_contents_delegate_->NavigationStateChanged( NULL, content::InvalidateTypes(0)); test_web_contents_delegate_->ActivateContents(NULL); @@ -84,7 +84,7 @@ TEST_F(WebDialogWebContentsDelegateTest, OpenURLFromTabTest) { OpenURLParams(GURL(url::kAboutBlankURL), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); // This should create a new foreground tab in the existing browser. EXPECT_EQ(1, browser()->tab_strip_model()->count()); @@ -111,7 +111,7 @@ TEST_F(WebDialogWebContentsDelegateTest, DetachTest) { OpenURLParams(GURL(url::kAboutBlankURL), Referrer(), NEW_FOREGROUND_TAB, - content::PAGE_TRANSITION_LINK, + ui::PAGE_TRANSITION_LINK, false)); test_web_contents_delegate_->AddNewContents(NULL, NULL, NEW_FOREGROUND_TAB, gfx::Rect(), false, NULL); diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h index 3cf8223..e482a52 100644 --- a/chrome/common/instant_types.h +++ b/chrome/common/instant_types.h @@ -10,7 +10,6 @@ #include "base/basictypes.h" #include "base/strings/string16.h" -#include "content/public/common/page_transition_types.h" #include "url/gurl.h" // ID used by Instant code to refer to objects (e.g. Autocomplete results, Most diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index ce78ad3..25ee700 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -1279,7 +1279,7 @@ bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, bool ChromeContentRendererClient::WillSendRequest( blink::WebFrame* frame, - content::PageTransition transition_type, + ui::PageTransition transition_type, const GURL& url, const GURL& first_party_for_cookies, GURL* new_url) { diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h index 34247ba..f8cfbb0 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h @@ -112,7 +112,7 @@ class ChromeContentRendererClient : public content::ContentRendererClient { bool is_server_redirect, bool* send_referrer) OVERRIDE; virtual bool WillSendRequest(blink::WebFrame* frame, - content::PageTransition transition_type, + ui::PageTransition transition_type, const GURL& url, const GURL& first_party_for_cookies, GURL* new_url) OVERRIDE; diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc index 08ba2a0..ed13621 100644 --- a/chrome/renderer/extensions/resource_request_policy.cc +++ b/chrome/renderer/extensions/resource_request_policy.cc @@ -8,7 +8,6 @@ #include "base/strings/stringprintf.h" #include "chrome/common/extensions/manifest_url_handler.h" #include "chrome/common/url_constants.h" -#include "content/public/common/page_transition_types.h" #include "extensions/common/constants.h" #include "extensions/common/extension.h" #include "extensions/common/extension_set.h" @@ -18,6 +17,7 @@ #include "third_party/WebKit/public/web/WebConsoleMessage.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebFrame.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" namespace extensions { @@ -32,7 +32,7 @@ namespace extensions { bool ResourceRequestPolicy::CanRequestResource( const GURL& resource_url, blink::WebFrame* frame, - content::PageTransition transition_type, + ui::PageTransition transition_type, const ExtensionSet* loaded_extensions) { CHECK(resource_url.SchemeIs(extensions::kExtensionScheme)); @@ -78,7 +78,7 @@ bool ResourceRequestPolicy::CanRequestResource( bool is_dev_tools = page_url.SchemeIs(content::kChromeDevToolsScheme) && !ManifestURL::GetDevToolsPage(extension).is_empty(); bool transition_allowed = - !content::PageTransitionIsWebTriggerable(transition_type); + !ui::PageTransitionIsWebTriggerable(transition_type); // - unreachable web page error page (to allow showing the icon of the // unreachable app on this page) bool is_error_page = frame_url == GURL(content::kUnreachableWebDataURL); diff --git a/chrome/renderer/extensions/resource_request_policy.h b/chrome/renderer/extensions/resource_request_policy.h index d33fd53..0049894 100644 --- a/chrome/renderer/extensions/resource_request_policy.h +++ b/chrome/renderer/extensions/resource_request_policy.h @@ -5,7 +5,7 @@ #ifndef CHROME_RENDERER_EXTENSIONS_RESOURCE_REQUEST_POLICY_H_ #define CHROME_RENDERER_EXTENSIONS_RESOURCE_REQUEST_POLICY_H_ -#include "content/public/common/page_transition_types.h" +#include "ui/base/page_transition_types.h" class GURL; @@ -27,7 +27,7 @@ class ResourceRequestPolicy { // than those triggered through UI. static bool CanRequestResource(const GURL& resource_url, blink::WebFrame* frame, - content::PageTransition transition_type, + ui::PageTransition transition_type, const ExtensionSet* loaded_extensions); // Returns true if the chrome-extension-resource:// |resource_url| can be // requested from |frame_url|. diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc index cd120ed..dc180d2 100644 --- a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc +++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc @@ -96,7 +96,7 @@ PhishingClassifierDelegate::PhishingClassifierDelegate( content::RenderView* render_view, PhishingClassifier* classifier) : content::RenderViewObserver(render_view), - last_main_frame_transition_(content::PAGE_TRANSITION_LINK), + last_main_frame_transition_(ui::PAGE_TRANSITION_LINK), have_page_text_(false), is_classifying_(false) { g_delegates.Get().insert(this); @@ -240,7 +240,7 @@ void PhishingClassifierDelegate::MaybeStartClassification() { return; } - if (last_main_frame_transition_ & content::PAGE_TRANSITION_FORWARD_BACK) { + if (last_main_frame_transition_ & ui::PAGE_TRANSITION_FORWARD_BACK) { // Skip loads from session history navigation. However, update the // last URL sent to the classifier, so that we'll properly detect // in-page navigations. diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate.h b/chrome/renderer/safe_browsing/phishing_classifier_delegate.h index 303886d..213d20a 100644 --- a/chrome/renderer/safe_browsing/phishing_classifier_delegate.h +++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate.h @@ -9,9 +9,9 @@ #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" -#include "content/public/common/page_transition_types.h" #include "content/public/renderer/render_process_observer.h" #include "content/public/renderer/render_view_observer.h" +#include "ui/base/page_transition_types.h" #include "url/gurl.h" namespace safe_browsing { @@ -115,7 +115,7 @@ class PhishingClassifierDelegate : public content::RenderViewObserver { // to exclude back/forward loads from classification. Note that this is // set in DidCommitProvisionalLoad(); the transition is reset after this // call in the RenderView, so we need to save off the value. - content::PageTransition last_main_frame_transition_; + ui::PageTransition last_main_frame_transition_; // The URL of the last load that we actually started classification on. // This is used to suppress phishing classification on subframe navigation diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc index 022ad4d..040cb5e 100644 --- a/chrome/test/base/browser_with_test_window_test.cc +++ b/chrome/test/base/browser_with_test_window_test.cc @@ -14,8 +14,8 @@ #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/test_renderer_host.h" +#include "ui/base/page_transition_types.h" #if defined(USE_AURA) #include "ui/aura/test/aura_test_helper.h" @@ -121,7 +121,7 @@ void BrowserWithTestWindowTest::TearDown() { } void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) { - chrome::NavigateParams params(browser, url, content::PAGE_TRANSITION_TYPED); + chrome::NavigateParams params(browser, url, ui::PAGE_TRANSITION_TYPED); params.tabstrip_index = 0; params.disposition = NEW_FOREGROUND_TAB; chrome::Navigate(¶ms); @@ -174,7 +174,7 @@ void BrowserWithTestWindowTest::NavigateAndCommit( NavigationController* controller, const GURL& url) { controller->LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); + url, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); CommitPendingLoad(controller); } diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h index cb65ebc..404e94a 100644 --- a/chrome/test/base/browser_with_test_window_test.h +++ b/chrome/test/base/browser_with_test_window_test.h @@ -71,7 +71,7 @@ class WebContents; // // This is equivalent to the above, and lets you test pending navigations. // browser()->OpenURL(OpenURLParams( // GURL("http://foo/2"), GURL(), CURRENT_TAB, -// content::PAGE_TRANSITION_TYPED, false)); +// ui::PAGE_TRANSITION_TYPED, false)); // CommitPendingLoad(controller); // // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc index 45b221d..f78058c 100644 --- a/chrome/test/base/in_process_browser_test.cc +++ b/chrome/test/base/in_process_browser_test.cc @@ -288,7 +288,7 @@ void InProcessBrowserTest::AddTabAtIndexToBrowser( Browser* browser, int index, const GURL& url, - content::PageTransition transition) { + ui::PageTransition transition) { chrome::NavigateParams params(browser, url, transition); params.tabstrip_index = index; params.disposition = NEW_FOREGROUND_TAB; @@ -300,7 +300,7 @@ void InProcessBrowserTest::AddTabAtIndexToBrowser( void InProcessBrowserTest::AddTabAtIndex( int index, const GURL& url, - content::PageTransition transition) { + ui::PageTransition transition) { AddTabAtIndexToBrowser(browser(), index, url, transition); } @@ -351,7 +351,7 @@ void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { content::NotificationService::AllSources()); chrome::AddSelectedTabWithURL(browser, GURL(url::kAboutBlankURL), - content::PAGE_TRANSITION_AUTO_TOPLEVEL); + ui::PAGE_TRANSITION_AUTO_TOPLEVEL); observer.Wait(); browser->window()->Show(); diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h index b0217d9..34a1e51 100644 --- a/chrome/test/base/in_process_browser_test.h +++ b/chrome/test/base/in_process_browser_test.h @@ -9,10 +9,10 @@ #include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_base.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" namespace base { @@ -111,9 +111,9 @@ class InProcessBrowserTest : public content::BrowserTestBase { void AddTabAtIndexToBrowser(Browser* browser, int index, const GURL& url, - content::PageTransition transition); + ui::PageTransition transition); void AddTabAtIndex(int index, const GURL& url, - content::PageTransition transition); + ui::PageTransition transition); // Initializes the contents of the user data directory. Called by SetUp() // after creating the user data directory, but before any browser is launched. diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index 40eede7..0a159b1 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc @@ -61,9 +61,9 @@ WindowOpenDisposition return CURRENT_TAB; } -content::PageTransition +ui::PageTransition TestBrowserWindow::TestLocationBar::GetPageTransition() const { - return content::PAGE_TRANSITION_LINK; + return ui::PAGE_TRANSITION_LINK; } bool TestBrowserWindow::TestLocationBar::ShowPageActionPopup( diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index 91315ea..b9c746a 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h @@ -167,7 +167,7 @@ class TestBrowserWindow : public BrowserWindow { virtual void ShowFirstRunBubble() OVERRIDE {} virtual GURL GetDestinationURL() const OVERRIDE; virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; - virtual content::PageTransition GetPageTransition() const OVERRIDE; + virtual ui::PageTransition GetPageTransition() const OVERRIDE; virtual void AcceptInput() OVERRIDE {} virtual void FocusLocation(bool select_all) OVERRIDE {} virtual void FocusSearch() OVERRIDE {} diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 6e7a1ce..b295a00 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -169,7 +169,7 @@ void NavigateToURL(chrome::NavigateParams* params) { void NavigateToURLWithPost(Browser* browser, const GURL& url) { chrome::NavigateParams params(browser, url, - content::PAGE_TRANSITION_FORM_SUBMIT); + ui::PAGE_TRANSITION_FORM_SUBMIT); params.uses_post = true; NavigateToURL(¶ms); } @@ -205,7 +205,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete( content::NotificationService::AllSources()); browser->OpenURL(OpenURLParams( - url, Referrer(), disposition, content::PAGE_TRANSITION_TYPED, false)); + url, Referrer(), disposition, ui::PAGE_TRANSITION_TYPED, false)); if (browser_test_flags & BROWSER_TEST_WAIT_FOR_BROWSER) browser = WaitForBrowserNotInSet(initial_browsers); if (browser_test_flags & BROWSER_TEST_WAIT_FOR_TAB) diff --git a/chrome/test/base/web_ui_browser_test.cc b/chrome/test/base/web_ui_browser_test.cc index cf9a2aa..997c14a 100644 --- a/chrome/test/base/web_ui_browser_test.cc +++ b/chrome/test/base/web_ui_browser_test.cc @@ -214,7 +214,7 @@ void WebUIBrowserTest::BrowsePreload(const GURL& browse_to) { web_contents, this, preload_test_fixture_, preload_test_name_); content::TestNavigationObserver navigation_observer(web_contents); chrome::NavigateParams params( - browser(), GURL(browse_to), content::PAGE_TRANSITION_TYPED); + browser(), GURL(browse_to), ui::PAGE_TRANSITION_TYPED); params.disposition = CURRENT_TAB; chrome::Navigate(¶ms); navigation_observer.Wait(); diff --git a/chrome/test/data/webui/history_ui_browsertest.cc b/chrome/test/data/webui/history_ui_browsertest.cc index a8b0c77..9477338 100644 --- a/chrome/test/data/webui/history_ui_browsertest.cc +++ b/chrome/test/data/webui/history_ui_browsertest.cc @@ -38,7 +38,7 @@ void HistoryUIBrowserTest::AddPageToHistory( base::Time time = baseline_time_ + base::TimeDelta::FromHours(hour_offset); GURL gurl = GURL(url); history_->AddPage(gurl, time, id_scope, page_id_++, GURL(), - history::RedirectList(), content::PAGE_TRANSITION_LINK, + history::RedirectList(), ui::PAGE_TRANSITION_LINK, history::SOURCE_BROWSED, false); history_->SetPageTitle(gurl, base::UTF8ToUTF16(title)); } diff --git a/chrome/test/gpu/webgl_infobar_browsertest.cc b/chrome/test/gpu/webgl_infobar_browsertest.cc index e9e1712..f906aca 100644 --- a/chrome/test/gpu/webgl_infobar_browsertest.cc +++ b/chrome/test/gpu/webgl_infobar_browsertest.cc @@ -25,10 +25,10 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "content/public/common/content_paths.h" -#include "content/public/common/page_transition_types.h" #include "content/public/test/browser_test_utils.h" #include "gpu/config/gpu_test_config.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/page_transition_types.h" #include "ui/gl/gl_implementation.h" namespace { @@ -42,9 +42,9 @@ void SimulateGPUCrash(Browser* browser) { chrome::NavigateParams params( browser, GURL(content::kChromeUIGpuCrashURL), - static_cast<content::PageTransition>( - content::PAGE_TRANSITION_TYPED | - content::PAGE_TRANSITION_FROM_ADDRESS_BAR)); + ui::PageTransitionFromInt( + ui::PAGE_TRANSITION_TYPED | + ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)); params.disposition = NEW_BACKGROUND_TAB; chrome::Navigate(¶ms); } diff --git a/chrome/test/perf/mach_ports_performancetest.cc b/chrome/test/perf/mach_ports_performancetest.cc index 8208a4f..e80b943 100644 --- a/chrome/test/perf/mach_ports_performancetest.cc +++ b/chrome/test/perf/mach_ports_performancetest.cc @@ -75,7 +75,7 @@ class MachPortsTest : public InProcessBrowserTest { // Adds a tab from the page cycler data at the specified domain. void AddTab(const std::string& domain) { GURL url = server_.GetURL("files/" + domain + "/").Resolve("?skip"); - AddTabAtIndex(0, url, content::PageTransition::PAGE_TRANSITION_TYPED); + AddTabAtIndex(0, url, ui::PAGE_TRANSITION_TYPED); } private: diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc index 82f12a8..0c80b23 100644 --- a/chrome/test/ppapi/ppapi_browsertest.cc +++ b/chrome/test/ppapi/ppapi_browsertest.cc @@ -1115,7 +1115,7 @@ TEST_PPAPI_NACL(View_CreatedVisible); IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) { // Make a second tab in the foreground. GURL url = GetTestFileUrl("View_CreatedInvisible"); - chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); + chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_LINK); params.disposition = NEW_BACKGROUND_TAB; ui_test_utils::NavigateToURL(¶ms); } @@ -1138,7 +1138,7 @@ IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, DISABLED_View_PageHideShow) { // Make a new tab to cause the original one to hide, this should trigger the // next phase of the test. chrome::NavigateParams params( - browser(), GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_LINK); + browser(), GURL(url::kAboutBlankURL), ui::PAGE_TRANSITION_LINK); params.disposition = NEW_FOREGROUND_TAB; ui_test_utils::NavigateToURL(¶ms); |