OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 SESSIONS_GETRECENTLYCLOSED) | 35 SESSIONS_GETRECENTLYCLOSED) |
36 | 36 |
37 private: | 37 private: |
38 api::tabs::Tab CreateTabModel(const sessions::TabRestoreService::Tab& tab, | 38 api::tabs::Tab CreateTabModel(const sessions::TabRestoreService::Tab& tab, |
39 int session_id, | 39 int session_id, |
40 int selected_index); | 40 int selected_index); |
41 std::unique_ptr<api::windows::Window> CreateWindowModel( | 41 std::unique_ptr<api::windows::Window> CreateWindowModel( |
42 const sessions::TabRestoreService::Window& window, | 42 const sessions::TabRestoreService::Window& window, |
43 int session_id); | 43 int session_id); |
44 std::unique_ptr<api::sessions::Session> CreateSessionModel( | 44 std::unique_ptr<api::sessions::Session> CreateSessionModel( |
45 const sessions::TabRestoreService::Entry* entry); | 45 const sessions::TabRestoreService::Entry& entry); |
46 }; | 46 }; |
47 | 47 |
48 class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction { | 48 class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction { |
49 protected: | 49 protected: |
50 ~SessionsGetDevicesFunction() override {} | 50 ~SessionsGetDevicesFunction() override {} |
51 bool RunSync() override; | 51 bool RunSync() override; |
52 DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES) | 52 DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES) |
53 | 53 |
54 private: | 54 private: |
55 api::tabs::Tab CreateTabModel(const std::string& session_tag, | 55 api::tabs::Tab CreateTabModel(const std::string& session_tag, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 // Created lazily upon OnListenerAdded. | 135 // Created lazily upon OnListenerAdded. |
136 std::unique_ptr<SessionsEventRouter> sessions_event_router_; | 136 std::unique_ptr<SessionsEventRouter> sessions_event_router_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(SessionsAPI); | 138 DISALLOW_COPY_AND_ASSIGN(SessionsAPI); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace extensions | 141 } // namespace extensions |
142 | 142 |
143 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ | 143 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ |
OLD | NEW |