OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
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_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 namespace sessions { | |
11 class LiveTab; | |
12 class LiveTabContext; | |
13 } | |
14 | |
15 namespace ios { | |
16 | |
17 class ChromeBrowserState; | |
18 | |
19 // A class that allows retrieving a sessions::LiveTabContext. | |
20 class LiveTabContextProvider { | |
21 public: | |
22 virtual ~LiveTabContextProvider() {} | |
23 | |
24 // Creates a new context. | |
25 virtual sessions::LiveTabContext* Create( | |
26 ios::ChromeBrowserState* browser_state) = 0; | |
27 | |
28 // Retrieves the context with the given ID, if one exists. | |
29 virtual sessions::LiveTabContext* FindContextWithID(int32_t desired_id) = 0; | |
30 | |
31 // Retrieves the context for the given tab, if one exists. | |
32 virtual sessions::LiveTabContext* FindContextForTab( | |
33 const sessions::LiveTab* tab) = 0; | |
34 }; | |
35 | |
36 } // namespace ios | |
37 | |
38 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SESSIONS_LIVE_TAB_CONTEXT_PROVIDER
_H_ | |
OLD | NEW |