OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER_H_ |
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
9 | 9 |
10 namespace sessions { | 10 namespace sessions { |
11 class LiveTab; | 11 class LiveTab; |
12 class LiveTabContext; | 12 class LiveTabContext; |
13 } | 13 } |
14 | 14 |
15 namespace ios { | 15 namespace ios { |
16 | 16 |
17 class ChromeBrowserState; | 17 class ChromeBrowserState; |
18 | 18 |
19 // A class that allows retrieving a sessions::LiveTabContext. | 19 // A class that allows retrieving a sessions::LiveTabContext. |
20 class LiveTabContextProvider { | 20 class LiveTabContextProvider { |
21 public: | 21 public: |
22 virtual ~LiveTabContextProvider() {} | 22 virtual ~LiveTabContextProvider() {} |
23 | 23 |
24 // Creates a new context. | 24 // Creates a new context. |
25 virtual sessions::LiveTabContext* Create( | 25 virtual sessions::LiveTabContext* Create( |
26 ios::ChromeBrowserState* browser_state) = 0; | 26 ios::ChromeBrowserState* browser_state) = 0; |
27 | 27 |
28 // Retrieves the context with the given ID, if one exists. | 28 // Retrieves the context with the given ID, if one exists. |
29 virtual sessions::LiveTabContext* FindContextWithID(int32 desired_id) = 0; | 29 virtual sessions::LiveTabContext* FindContextWithID(int32_t desired_id) = 0; |
30 | 30 |
31 // Retrieves the context for the given tab, if one exists. | 31 // Retrieves the context for the given tab, if one exists. |
32 virtual sessions::LiveTabContext* FindContextForTab( | 32 virtual sessions::LiveTabContext* FindContextForTab( |
33 const sessions::LiveTab* tab) = 0; | 33 const sessions::LiveTab* tab) = 0; |
34 }; | 34 }; |
35 | 35 |
36 } // namespace ios | 36 } // namespace ios |
37 | 37 |
38 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER
_H_ | 38 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER
_H_ |
OLD | NEW |