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_LIVE_TAB_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "chrome/browser/ui/host_desktop.h" | |
14 #include "components/sessions/core/live_tab_context.h" | 13 #include "components/sessions/core/live_tab_context.h" |
15 | 14 |
16 class Browser; | 15 class Browser; |
17 class Profile; | 16 class Profile; |
18 | 17 |
19 namespace content { | 18 namespace content { |
20 class WebContents; | 19 class WebContents; |
21 } | 20 } |
22 | 21 |
23 // Implementation of LiveTabContext which uses an instance of | 22 // Implementation of LiveTabContext which uses an instance of |
(...skipping 27 matching lines...) Expand all Loading... |
51 int selected_navigation, | 50 int selected_navigation, |
52 bool from_last_session, | 51 bool from_last_session, |
53 const std::string& extension_app_id, | 52 const std::string& extension_app_id, |
54 const sessions::PlatformSpecificTabData* tab_platform_data, | 53 const sessions::PlatformSpecificTabData* tab_platform_data, |
55 const std::string& user_agent_override) override; | 54 const std::string& user_agent_override) override; |
56 void CloseTab() override; | 55 void CloseTab() override; |
57 | 56 |
58 // see Browser::Create | 57 // see Browser::Create |
59 static sessions::LiveTabContext* Create( | 58 static sessions::LiveTabContext* Create( |
60 Profile* profile, | 59 Profile* profile, |
61 chrome::HostDesktopType host_desktop_type, | |
62 const std::string& app_name); | 60 const std::string& app_name); |
63 | 61 |
64 // see browser::FindBrowserForWebContents | 62 // see browser::FindBrowserForWebContents |
65 static sessions::LiveTabContext* FindContextForWebContents( | 63 static sessions::LiveTabContext* FindContextForWebContents( |
66 const content::WebContents* contents); | 64 const content::WebContents* contents); |
67 | 65 |
68 // see chrome::FindBrowserWithID | 66 // see chrome::FindBrowserWithID |
69 // Returns the LiveTabContext of the Browser with |desired_id| if | 67 // Returns the LiveTabContext of the Browser with |desired_id| if |
70 // such a Browser exists and is on the desktop defined by |host_desktop_type|. | 68 // such a Browser exists. |
71 static sessions::LiveTabContext* FindContextWithID( | 69 static sessions::LiveTabContext* FindContextWithID( |
72 SessionID::id_type desired_id, | 70 SessionID::id_type desired_id); |
73 chrome::HostDesktopType host_desktop_type); | |
74 | 71 |
75 private: | 72 private: |
76 Browser* browser_; | 73 Browser* browser_; |
77 | 74 |
78 DISALLOW_COPY_AND_ASSIGN(BrowserLiveTabContext); | 75 DISALLOW_COPY_AND_ASSIGN(BrowserLiveTabContext); |
79 }; | 76 }; |
80 | 77 |
81 #endif // CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ | 78 #endif // CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_ |
OLD | NEW |