| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 scoped_ptr<api::tabs::Tab> CreateTabModel(const std::string& session_tag, | 56 scoped_ptr<api::tabs::Tab> CreateTabModel(const std::string& session_tag, |
| 57 const sessions::SessionTab& tab, | 57 const sessions::SessionTab& tab, |
| 58 int tab_index, | 58 int tab_index, |
| 59 int selected_index); | 59 int selected_index); |
| 60 scoped_ptr<api::windows::Window> CreateWindowModel( | 60 scoped_ptr<api::windows::Window> CreateWindowModel( |
| 61 const sessions::SessionWindow& window, | 61 const sessions::SessionWindow& window, |
| 62 const std::string& session_tag); | 62 const std::string& session_tag); |
| 63 scoped_ptr<api::sessions::Session> CreateSessionModel( | 63 scoped_ptr<api::sessions::Session> CreateSessionModel( |
| 64 const sessions::SessionWindow& window, | 64 const sessions::SessionWindow& window, |
| 65 const std::string& session_tag); | 65 const std::string& session_tag); |
| 66 scoped_ptr<api::sessions::Device> CreateDeviceModel( | 66 api::sessions::Device CreateDeviceModel( |
| 67 const sync_driver::SyncedSession* session); | 67 const sync_driver::SyncedSession* session); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 class SessionsRestoreFunction : public ChromeSyncExtensionFunction { | 70 class SessionsRestoreFunction : public ChromeSyncExtensionFunction { |
| 71 protected: | 71 protected: |
| 72 ~SessionsRestoreFunction() override {} | 72 ~SessionsRestoreFunction() override {} |
| 73 bool RunSync() override; | 73 bool RunSync() override; |
| 74 DECLARE_EXTENSION_FUNCTION("sessions.restore", SESSIONS_RESTORE) | 74 DECLARE_EXTENSION_FUNCTION("sessions.restore", SESSIONS_RESTORE) |
| 75 | 75 |
| 76 private: | 76 private: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Created lazily upon OnListenerAdded. | 136 // Created lazily upon OnListenerAdded. |
| 137 scoped_ptr<SessionsEventRouter> sessions_event_router_; | 137 scoped_ptr<SessionsEventRouter> sessions_event_router_; |
| 138 | 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(SessionsAPI); | 139 DISALLOW_COPY_AND_ASSIGN(SessionsAPI); |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 } // namespace extensions | 142 } // namespace extensions |
| 143 | 143 |
| 144 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ | 144 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ |
| OLD | NEW |