| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_BROWSER_TABSTRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| 7 | 7 |
| 8 #include "content/public/common/page_transition_types.h" | 8 #include "content/public/common/page_transition_types.h" |
| 9 #include "content/public/browser/navigation_controller.h" |
| 9 #include "webkit/glue/window_open_disposition.h" | 10 #include "webkit/glue/window_open_disposition.h" |
| 10 | 11 |
| 11 class Browser; | 12 class Browser; |
| 12 class GURL; | 13 class GURL; |
| 13 class Profile; | 14 class Profile; |
| 14 class TabContents; | 15 class TabContents; |
| 15 | 16 |
| 16 namespace content { | 17 namespace content { |
| 17 class SessionStorageNamespace; | |
| 18 class SiteInstance; | 18 class SiteInstance; |
| 19 class WebContents; | 19 class WebContents; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace gfx { | 22 namespace gfx { |
| 23 class Rect; | 23 class Rect; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace chrome { | 26 namespace chrome { |
| 27 | 27 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void AddWebContents(Browser* browser, | 59 void AddWebContents(Browser* browser, |
| 60 content::WebContents* source_contents, | 60 content::WebContents* source_contents, |
| 61 content::WebContents* new_contents, | 61 content::WebContents* new_contents, |
| 62 WindowOpenDisposition disposition, | 62 WindowOpenDisposition disposition, |
| 63 const gfx::Rect& initial_pos, | 63 const gfx::Rect& initial_pos, |
| 64 bool user_gesture); | 64 bool user_gesture); |
| 65 void CloseWebContents(Browser* browser, content::WebContents* contents); | 65 void CloseWebContents(Browser* browser, content::WebContents* contents); |
| 66 | 66 |
| 67 void CloseAllTabs(Browser* browser); | 67 void CloseAllTabs(Browser* browser); |
| 68 | 68 |
| 69 // Centralized method for creating a TabContents, configuring and | 69 // Centralized methods for creating a TabContents, configuring and |
| 70 // installing all its supporting objects and observers. | 70 // installing all its supporting objects and observers. |
| 71 TabContents* TabContentsFactory( | 71 TabContents* TabContentsFactory( |
| 72 Profile* profile, | 72 Profile* profile, |
| 73 content::SiteInstance* site_instance, | 73 content::SiteInstance* site_instance, |
| 74 int routing_id, | 74 int routing_id, |
| 75 const content::WebContents* base_web_contents); |
| 76 |
| 77 // Same as TabContentsFactory, but allows specifying the initial |
| 78 // |session_storage_namespace_map|. This is for supporting session restore |
| 79 // where we reconstitute the session storage namespaces for a browsing context. |
| 80 // |
| 81 // You do not want to call this. If you think you do, make sure you completely |
| 82 // understand when SessionStorageNamespace objects should be cloned, why |
| 83 // they should not be shared by multiple WebContents, and what bad things |
| 84 // can happen if you share the object. |
| 85 TabContents* TabContentsWithSessionStorageFactory( |
| 86 Profile* profile, |
| 87 content::SiteInstance* site_instance, |
| 88 int routing_id, |
| 75 const content::WebContents* base_web_contents, | 89 const content::WebContents* base_web_contents, |
| 76 content::SessionStorageNamespace* session_storage_namespace); | 90 const content::SessionStorageNamespaceMap& session_storage_namespace_map); |
| 77 | 91 |
| 78 } // namespace chrome | 92 } // namespace chrome |
| 79 | 93 |
| 80 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ | 94 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| OLD | NEW |