OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // --------------------------------------------------------------------------- | 131 // --------------------------------------------------------------------------- |
132 | 132 |
133 NavigationController(TabContents* tab_contents, Profile* profile); | 133 NavigationController(TabContents* tab_contents, Profile* profile); |
134 ~NavigationController(); | 134 ~NavigationController(); |
135 | 135 |
136 // Returns the profile for this controller. It can never be NULL. | 136 // Returns the profile for this controller. It can never be NULL. |
137 Profile* profile() const { | 137 Profile* profile() const { |
138 return profile_; | 138 return profile_; |
139 } | 139 } |
140 | 140 |
| 141 // Sets the profile for this controller. |
| 142 void set_profile(Profile* profile) { |
| 143 profile_ = profile; |
| 144 } |
| 145 |
141 // Initializes this NavigationController with the given saved navigations, | 146 // Initializes this NavigationController with the given saved navigations, |
142 // using selected_navigation as the currently loaded entry. Before this call | 147 // using selected_navigation as the currently loaded entry. Before this call |
143 // the controller should be unused (there should be no current entry). This is | 148 // the controller should be unused (there should be no current entry). This is |
144 // used for session restore. | 149 // used for session restore. |
145 void RestoreFromState(const std::vector<TabNavigation>& navigations, | 150 void RestoreFromState(const std::vector<TabNavigation>& navigations, |
146 int selected_navigation); | 151 int selected_navigation); |
147 | 152 |
148 // Active entry -------------------------------------------------------------- | 153 // Active entry -------------------------------------------------------------- |
149 | 154 |
150 // Returns the active entry, which is the transient entry if any, the pending | 155 // Returns the active entry, which is the transient entry if any, the pending |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // when testing. | 513 // when testing. |
509 static bool check_for_repost_; | 514 static bool check_for_repost_; |
510 | 515 |
511 // The maximum number of entries that a navigation controller can store. | 516 // The maximum number of entries that a navigation controller can store. |
512 static size_t max_entry_count_; | 517 static size_t max_entry_count_; |
513 | 518 |
514 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 519 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
515 }; | 520 }; |
516 | 521 |
517 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 522 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |