OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "chrome/common/notification_registrar.h" | 30 #include "chrome/common/notification_registrar.h" |
31 #include "chrome/common/page_transition_types.h" | 31 #include "chrome/common/page_transition_types.h" |
32 #include "chrome/common/page_zoom.h" | 32 #include "chrome/common/page_zoom.h" |
33 #include "gfx/rect.h" | 33 #include "gfx/rect.h" |
34 | 34 |
35 class BrowserWindow; | 35 class BrowserWindow; |
36 class Extension; | 36 class Extension; |
37 class FindBarController; | 37 class FindBarController; |
38 class PrefService; | 38 class PrefService; |
39 class Profile; | 39 class Profile; |
| 40 class SessionStorageNamespace; |
40 class SkBitmap; | 41 class SkBitmap; |
41 class StatusBubble; | 42 class StatusBubble; |
42 class TabNavigation; | 43 class TabNavigation; |
43 namespace gfx { | 44 namespace gfx { |
44 class Point; | 45 class Point; |
45 } | 46 } |
46 | 47 |
47 class Browser : public TabStripModelDelegate, | 48 class Browser : public TabStripModelDelegate, |
48 public TabStripModelObserver, | 49 public TabStripModelObserver, |
49 public TabContentsDelegate, | 50 public TabContentsDelegate, |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // non-empty the tab is an app tab and |extension_app_id| is the id of the | 364 // non-empty the tab is an app tab and |extension_app_id| is the id of the |
364 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then | 365 // extension. If |pin| is true and |tab_index|/ is the last pinned tab, then |
365 // the newly created tab is pinned. If |from_last_session| is true, | 366 // the newly created tab is pinned. If |from_last_session| is true, |
366 // |navigations| are from the previous session. | 367 // |navigations| are from the previous session. |
367 TabContents* AddRestoredTab(const std::vector<TabNavigation>& navigations, | 368 TabContents* AddRestoredTab(const std::vector<TabNavigation>& navigations, |
368 int tab_index, | 369 int tab_index, |
369 int selected_navigation, | 370 int selected_navigation, |
370 const std::string& extension_app_id, | 371 const std::string& extension_app_id, |
371 bool select, | 372 bool select, |
372 bool pin, | 373 bool pin, |
373 bool from_last_session); | 374 bool from_last_session, |
| 375 SessionStorageNamespace* storage_namespace); |
374 // Creates a new tab with the already-created TabContents 'new_contents'. | 376 // Creates a new tab with the already-created TabContents 'new_contents'. |
375 // The window for the added contents will be reparented correctly when this | 377 // The window for the added contents will be reparented correctly when this |
376 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the | 378 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the |
377 // initial position. | 379 // initial position. |
378 void AddTabContents(TabContents* new_contents, | 380 void AddTabContents(TabContents* new_contents, |
379 WindowOpenDisposition disposition, | 381 WindowOpenDisposition disposition, |
380 const gfx::Rect& initial_pos, | 382 const gfx::Rect& initial_pos, |
381 bool user_gesture); | 383 bool user_gesture); |
382 void CloseTabContents(TabContents* contents); | 384 void CloseTabContents(TabContents* contents); |
383 | 385 |
(...skipping 10 matching lines...) Expand all Loading... |
394 // Notification that some of our content has changed size as | 396 // Notification that some of our content has changed size as |
395 // part of an animation. | 397 // part of an animation. |
396 void ToolbarSizeChanged(bool is_animating); | 398 void ToolbarSizeChanged(bool is_animating); |
397 | 399 |
398 // Replaces the state of the currently selected tab with the session | 400 // Replaces the state of the currently selected tab with the session |
399 // history restored from the SessionRestore system. | 401 // history restored from the SessionRestore system. |
400 void ReplaceRestoredTab( | 402 void ReplaceRestoredTab( |
401 const std::vector<TabNavigation>& navigations, | 403 const std::vector<TabNavigation>& navigations, |
402 int selected_navigation, | 404 int selected_navigation, |
403 bool from_last_session, | 405 bool from_last_session, |
404 const std::string& extension_app_id); | 406 const std::string& extension_app_id, |
| 407 SessionStorageNamespace* session_storage_namespace); |
405 | 408 |
406 // Navigate to an index in the tab history, opening a new tab depending on the | 409 // Navigate to an index in the tab history, opening a new tab depending on the |
407 // disposition. | 410 // disposition. |
408 bool NavigateToIndexWithDisposition(int index, WindowOpenDisposition disp); | 411 bool NavigateToIndexWithDisposition(int index, WindowOpenDisposition disp); |
409 | 412 |
410 // Show a given a URL. If a tab with the same URL (ignoring the ref) is | 413 // Show a given a URL. If a tab with the same URL (ignoring the ref) is |
411 // already visible in this browser, it becomes selected. Otherwise a new tab | 414 // already visible in this browser, it becomes selected. Otherwise a new tab |
412 // is created. | 415 // is created. |
413 void ShowSingletonTab(const GURL& url); | 416 void ShowSingletonTab(const GURL& url); |
414 | 417 |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 mutable BooleanPrefMember use_vertical_tabs_; | 1078 mutable BooleanPrefMember use_vertical_tabs_; |
1076 | 1079 |
1077 // The profile's tab restore service. The service is owned by the profile, | 1080 // The profile's tab restore service. The service is owned by the profile, |
1078 // and we install ourselves as an observer. | 1081 // and we install ourselves as an observer. |
1079 TabRestoreService* tab_restore_service_; | 1082 TabRestoreService* tab_restore_service_; |
1080 | 1083 |
1081 DISALLOW_COPY_AND_ASSIGN(Browser); | 1084 DISALLOW_COPY_AND_ASSIGN(Browser); |
1082 }; | 1085 }; |
1083 | 1086 |
1084 #endif // CHROME_BROWSER_BROWSER_H_ | 1087 #endif // CHROME_BROWSER_BROWSER_H_ |
OLD | NEW |