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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents.cc
===================================================================
--- content/browser/tab_contents/tab_contents.cc (revision 105162)
+++ content/browser/tab_contents/tab_contents.cc (working copy)
@@ -535,7 +535,7 @@
TabContents* TabContents::OpenURL(const GURL& url,
const GURL& referrer,
WindowOpenDisposition disposition,
- PageTransition::Type transition) {
+ content::PageTransition transition) {
return OpenURL(OpenURLParams(url, referrer, disposition, transition));
}
@@ -1048,8 +1048,10 @@
// Note that we don't call NavigationController::GotToOffset() as we don't
// want to create a pending navigation entry (it might end up lingering
// http://crbug.com/51680).
- entry->set_transition_type(entry->transition_type() |
- PageTransition::FORWARD_BACK);
+ entry->set_transition_type(
+ content::PageTransitionFromInt(
+ entry->transition_type() |
+ content::PAGE_TRANSITION_FORWARD_BACK));
NavigateToEntry(*entry, NavigationController::NO_RELOAD);
// If the entry is being restored and doesn't have a SiteInstance yet, fill
@@ -1455,7 +1457,7 @@
void TabContents::DidNavigate(RenderViewHost* rvh,
const ViewHostMsg_FrameNavigate_Params& params) {
- if (PageTransition::IsMainFrame(params.transition))
+ if (content::PageTransitionIsMainFrame(params.transition))
render_manager_.DidNavigateMainFrame(rvh);
// Update the site of the SiteInstance if it doesn't have one yet.
@@ -1470,7 +1472,7 @@
// (see http://code.google.com/p/chromium/issues/detail?id=2929 )
// TODO(jungshik): Add a test for the encoding menu to avoid
// regressing it again.
- if (PageTransition::IsMainFrame(params.transition))
+ if (content::PageTransitionIsMainFrame(params.transition))
contents_mime_type_ = params.contents_mime_type;
content::LoadCommittedDetails details;
@@ -1485,14 +1487,15 @@
// tracking navigation events, we treat this event as a sub frame navigation
// event.
bool is_main_frame = did_navigate ? details.is_main_frame : false;
- PageTransition::Type transition_type = params.transition;
+ content::PageTransition transition_type = params.transition;
// Whether or not a page transition was triggered by going backward or
// forward in the history is only stored in the navigation controller's
// entry list.
if (did_navigate &&
(controller_.GetActiveEntry()->transition_type() &
- PageTransition::FORWARD_BACK)) {
- transition_type = params.transition | PageTransition::FORWARD_BACK;
+ content::PAGE_TRANSITION_FORWARD_BACK)) {
+ transition_type = content::PageTransitionFromInt(
+ params.transition | content::PAGE_TRANSITION_FORWARD_BACK);
}
// Notify observers about the commit of the provisional load.
FOR_EACH_OBSERVER(TabContentsObserver, observers_,
@@ -1668,7 +1671,7 @@
WindowOpenDisposition disposition,
int64 source_frame_id) {
TabContents* new_contents = NULL;
- PageTransition::Type transition_type = PageTransition::LINK;
+ content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
if (render_manager_.web_ui()) {
// When we're a Web UI, it will provide a page transition type for us (this
// is so the new tab page can specify AUTO_BOOKMARK for automatically
@@ -1682,7 +1685,8 @@
render_manager_.web_ui()->link_transition_type());
transition_type = render_manager_.web_ui()->link_transition_type();
} else {
- new_contents = OpenURL(url, referrer, disposition, PageTransition::LINK);
+ new_contents = OpenURL(
+ url, referrer, disposition, content::PAGE_TRANSITION_LINK);
}
if (new_contents) {
// Notify observers.
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698