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

Side by Side Diff: content/browser/tab_contents/page_navigator.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // PageNavigator defines an interface that can be used to express the user's 5 // PageNavigator defines an interface that can be used to express the user's
6 // intention to navigate to a particular URL. The implementing class should 6 // intention to navigate to a particular URL. The implementing class should
7 // perform the navigation. 7 // perform the navigation.
8 8
9 #ifndef CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_ 9 #ifndef CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_
10 #define CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_ 10 #define CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_
11 #pragma once 11 #pragma once
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/page_transition_types.h" 16 #include "content/public/common/page_transition_types.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "webkit/glue/window_open_disposition.h" 18 #include "webkit/glue/window_open_disposition.h"
19 19
20 class TabContents; 20 class TabContents;
21 21
22 struct CONTENT_EXPORT OpenURLParams { 22 struct CONTENT_EXPORT OpenURLParams {
23 OpenURLParams(const GURL& url, 23 OpenURLParams(const GURL& url,
24 const GURL& referrer, 24 const GURL& referrer,
25 WindowOpenDisposition disposition, 25 WindowOpenDisposition disposition,
26 PageTransition::Type transition); 26 content::PageTransition transition);
27 ~OpenURLParams(); 27 ~OpenURLParams();
28 class TabContents; 28 class TabContents;
29 29
30 // The URL/referrer to be opened. 30 // The URL/referrer to be opened.
31 GURL url; 31 GURL url;
32 GURL referrer; 32 GURL referrer;
33 33
34 // The disposition requested by the navigation source. 34 // The disposition requested by the navigation source.
35 WindowOpenDisposition disposition; 35 WindowOpenDisposition disposition;
36 36
37 // The transition type of navigation. 37 // The transition type of navigation.
38 PageTransition::Type transition; 38 content::PageTransition transition;
39 39
40 // The override encoding of the URL contents to be opened. 40 // The override encoding of the URL contents to be opened.
41 std::string override_encoding; 41 std::string override_encoding;
42 42
43 private: 43 private:
44 OpenURLParams(); 44 OpenURLParams();
45 }; 45 };
46 46
47 class CONTENT_EXPORT PageNavigator { 47 class CONTENT_EXPORT PageNavigator {
48 public: 48 public:
49 // Deprecated. Please use the one-argument variant instead. 49 // Deprecated. Please use the one-argument variant instead.
50 // TODO(adriansc): Remove this method when refactoring changed all call sites. 50 // TODO(adriansc): Remove this method when refactoring changed all call sites.
51 virtual TabContents* OpenURL(const GURL& url, 51 virtual TabContents* OpenURL(const GURL& url,
52 const GURL& referrer, 52 const GURL& referrer,
53 WindowOpenDisposition disposition, 53 WindowOpenDisposition disposition,
54 PageTransition::Type transition) = 0; 54 content::PageTransition transition) = 0;
55 55
56 // Opens a URL with the given disposition. The transition specifies how this 56 // Opens a URL with the given disposition. The transition specifies how this
57 // navigation should be recorded in the history system (for example, typed). 57 // navigation should be recorded in the history system (for example, typed).
58 // Returns the TabContents the URL is opened in, or NULL if the URL wasn't 58 // Returns the TabContents the URL is opened in, or NULL if the URL wasn't
59 // opened immediately. 59 // opened immediately.
60 virtual TabContents* OpenURL(const OpenURLParams& params) = 0; 60 virtual TabContents* OpenURL(const OpenURLParams& params) = 0;
61 61
62 protected: 62 protected:
63 virtual ~PageNavigator() {} 63 virtual ~PageNavigator() {}
64 }; 64 };
65 65
66 #endif // CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_ 66 #endif // CONTENT_BROWSER_TAB_CONTENTS_PAGE_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/navigation_entry_unittest.cc ('k') | content/browser/tab_contents/page_navigator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698