| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/controller.h" | 8 #include "chrome/browser/controller.h" |
| 9 #include "chrome/browser/hang_monitor/hung_plugin_action.h" | 9 #include "chrome/browser/hang_monitor/hung_plugin_action.h" |
| 10 #include "chrome/browser/hang_monitor/hung_window_detector.h" | 10 #include "chrome/browser/hang_monitor/hung_window_detector.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 void CloseAllTabs() { | 187 void CloseAllTabs() { |
| 188 tabstrip_model_.CloseAllTabs(); | 188 tabstrip_model_.CloseAllTabs(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Tab Creation functions //////////////////////////////////////////////////// | 191 // Tab Creation functions //////////////////////////////////////////////////// |
| 192 | 192 |
| 193 // Add a new tab with the specified URL. If instance is not null, its process | 193 // Add a new tab with the specified URL. If instance is not null, its process |
| 194 // will be used to render the tab. | 194 // will be used to render the tab. |
| 195 TabContents* AddTabWithURL( | 195 TabContents* AddTabWithURL( |
| 196 const GURL& url, PageTransition::Type transition, bool foreground, | 196 const GURL& url, const GURL& referrer, |
| 197 PageTransition::Type transition, bool foreground, |
| 197 SiteInstance* instance); | 198 SiteInstance* instance); |
| 198 | 199 |
| 199 // Add a new application tab for the specified URL. If lazy is true, the tab | 200 // Add a new application tab for the specified URL. If lazy is true, the tab |
| 200 // won't be selected. Further, the initial web page load will only take place | 201 // won't be selected. Further, the initial web page load will only take place |
| 201 // when the tab is first selected. | 202 // when the tab is first selected. |
| 202 TabContents* AddWebApplicationTab(Profile* profile, | 203 TabContents* AddWebApplicationTab(Profile* profile, |
| 203 WebApp* web_app, | 204 WebApp* web_app, |
| 204 bool lazy); | 205 bool lazy); |
| 205 | 206 |
| 206 // Add a new tab, given a NavigationController. A TabContents appropriate to | 207 // Add a new tab, given a NavigationController. A TabContents appropriate to |
| (...skipping 16 matching lines...) Expand all Loading... |
| 223 int selected_navigation); | 224 int selected_navigation); |
| 224 | 225 |
| 225 // Overridden from TabStripDelegate: | 226 // Overridden from TabStripDelegate: |
| 226 virtual void CreateNewStripWithContents(TabContents* detached_contents, | 227 virtual void CreateNewStripWithContents(TabContents* detached_contents, |
| 227 const gfx::Point& drop_point); | 228 const gfx::Point& drop_point); |
| 228 virtual int GetDragActions() const; | 229 virtual int GetDragActions() const; |
| 229 // Construct a TabContents for a given URL, profile and transition type. | 230 // Construct a TabContents for a given URL, profile and transition type. |
| 230 // If instance is not null, its process will be used to render the tab. | 231 // If instance is not null, its process will be used to render the tab. |
| 231 virtual TabContents* CreateTabContentsForURL( | 232 virtual TabContents* CreateTabContentsForURL( |
| 232 const GURL& url, | 233 const GURL& url, |
| 234 const GURL& referrer, |
| 233 Profile* profile, | 235 Profile* profile, |
| 234 PageTransition::Type transition, | 236 PageTransition::Type transition, |
| 235 bool defer_load, | 237 bool defer_load, |
| 236 SiteInstance* instance) const; | 238 SiteInstance* instance) const; |
| 237 virtual void ShowApplicationMenu(const gfx::Point& p); | 239 virtual void ShowApplicationMenu(const gfx::Point& p); |
| 238 virtual bool CanDuplicateContentsAt(int index); | 240 virtual bool CanDuplicateContentsAt(int index); |
| 239 virtual void DuplicateContentsAt(int index); | 241 virtual void DuplicateContentsAt(int index); |
| 240 virtual void ValidateLoadingAnimations(); | 242 virtual void ValidateLoadingAnimations(); |
| 241 virtual void CloseFrameAfterDragSession(); | 243 virtual void CloseFrameAfterDragSession(); |
| 242 | 244 |
| 243 // Overridden from TabStripObserver: | 245 // Overridden from TabStripObserver: |
| 244 virtual void TabInsertedAt(TabContents* contents, | 246 virtual void TabInsertedAt(TabContents* contents, |
| 245 int index, | 247 int index, |
| 246 bool foreground); | 248 bool foreground); |
| 247 virtual void TabClosingAt(TabContents* contents, int index); | 249 virtual void TabClosingAt(TabContents* contents, int index); |
| 248 virtual void TabDetachedAt(TabContents* contents, int index); | 250 virtual void TabDetachedAt(TabContents* contents, int index); |
| 249 virtual void TabSelectedAt(TabContents* old_contents, | 251 virtual void TabSelectedAt(TabContents* old_contents, |
| 250 TabContents* new_contents, | 252 TabContents* new_contents, |
| 251 int index, | 253 int index, |
| 252 bool user_gesture); | 254 bool user_gesture); |
| 253 virtual void TabMoved(TabContents* contents, | 255 virtual void TabMoved(TabContents* contents, |
| 254 int from_index, | 256 int from_index, |
| 255 int to_index); | 257 int to_index); |
| 256 virtual void TabStripEmpty(); | 258 virtual void TabStripEmpty(); |
| 257 | 259 |
| 258 // Overridden from TabContentsDelegate: | 260 // Overridden from TabContentsDelegate: |
| 259 virtual void OpenURLFromTab(TabContents* source, | 261 virtual void OpenURLFromTab(TabContents* source, |
| 260 const GURL& url, | 262 const GURL& url, const GURL& referrer, |
| 261 WindowOpenDisposition disposition, | 263 WindowOpenDisposition disposition, |
| 262 PageTransition::Type transition); | 264 PageTransition::Type transition); |
| 263 virtual void NavigationStateChanged(const TabContents* source, | 265 virtual void NavigationStateChanged(const TabContents* source, |
| 264 unsigned changed_flags); | 266 unsigned changed_flags); |
| 265 virtual void ReplaceContents(TabContents* source, TabContents* new_contents); | 267 virtual void ReplaceContents(TabContents* source, TabContents* new_contents); |
| 266 virtual void AddNewContents(TabContents* source, | 268 virtual void AddNewContents(TabContents* source, |
| 267 TabContents* new_contents, | 269 TabContents* new_contents, |
| 268 WindowOpenDisposition disposition, | 270 WindowOpenDisposition disposition, |
| 269 const gfx::Rect& initial_pos, | 271 const gfx::Rect& initial_pos, |
| 270 bool user_gesture); | 272 bool user_gesture); |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 scoped_ptr<BrowserIdleTimer> idle_task_; | 613 scoped_ptr<BrowserIdleTimer> idle_task_; |
| 612 | 614 |
| 613 // Keep track of the encoding auto detect pref. | 615 // Keep track of the encoding auto detect pref. |
| 614 BooleanPrefMember encoding_auto_detect_; | 616 BooleanPrefMember encoding_auto_detect_; |
| 615 | 617 |
| 616 DISALLOW_COPY_AND_ASSIGN(Browser); | 618 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 617 }; | 619 }; |
| 618 | 620 |
| 619 #endif // CHROME_BROWSER_BROWSER_H_ | 621 #endif // CHROME_BROWSER_BROWSER_H_ |
| 620 | 622 |
| OLD | NEW |