Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: chrome/browser/extensions/api/sessions/sessions_api.h

Issue 1843163003: [Extensions] Convert APIs to use movable types [14] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 class SessionId; 28 class SessionId;
29 29
30 class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction { 30 class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction {
31 protected: 31 protected:
32 ~SessionsGetRecentlyClosedFunction() override {} 32 ~SessionsGetRecentlyClosedFunction() override {}
33 bool RunSync() override; 33 bool RunSync() override;
34 DECLARE_EXTENSION_FUNCTION("sessions.getRecentlyClosed", 34 DECLARE_EXTENSION_FUNCTION("sessions.getRecentlyClosed",
35 SESSIONS_GETRECENTLYCLOSED) 35 SESSIONS_GETRECENTLYCLOSED)
36 36
37 private: 37 private:
38 scoped_ptr<api::tabs::Tab> CreateTabModel( 38 api::tabs::Tab CreateTabModel(const sessions::TabRestoreService::Tab& tab,
39 const sessions::TabRestoreService::Tab& tab, 39 int session_id,
40 int session_id, 40 int selected_index);
41 int selected_index);
42 scoped_ptr<api::windows::Window> CreateWindowModel( 41 scoped_ptr<api::windows::Window> CreateWindowModel(
43 const sessions::TabRestoreService::Window& window, 42 const sessions::TabRestoreService::Window& window,
44 int session_id); 43 int session_id);
45 scoped_ptr<api::sessions::Session> CreateSessionModel( 44 scoped_ptr<api::sessions::Session> CreateSessionModel(
46 const sessions::TabRestoreService::Entry* entry); 45 const sessions::TabRestoreService::Entry* entry);
47 }; 46 };
48 47
49 class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction { 48 class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction {
50 protected: 49 protected:
51 ~SessionsGetDevicesFunction() override {} 50 ~SessionsGetDevicesFunction() override {}
52 bool RunSync() override; 51 bool RunSync() override;
53 DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES) 52 DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES)
54 53
55 private: 54 private:
56 scoped_ptr<api::tabs::Tab> CreateTabModel(const std::string& session_tag, 55 api::tabs::Tab CreateTabModel(const std::string& session_tag,
57 const sessions::SessionTab& tab, 56 const sessions::SessionTab& tab,
58 int tab_index, 57 int tab_index,
59 int selected_index); 58 int selected_index);
60 scoped_ptr<api::windows::Window> CreateWindowModel( 59 scoped_ptr<api::windows::Window> CreateWindowModel(
61 const sessions::SessionWindow& window, 60 const sessions::SessionWindow& window,
62 const std::string& session_tag); 61 const std::string& session_tag);
63 scoped_ptr<api::sessions::Session> CreateSessionModel( 62 scoped_ptr<api::sessions::Session> CreateSessionModel(
64 const sessions::SessionWindow& window, 63 const sessions::SessionWindow& window,
65 const std::string& session_tag); 64 const std::string& session_tag);
66 api::sessions::Device CreateDeviceModel( 65 api::sessions::Device CreateDeviceModel(
67 const sync_driver::SyncedSession* session); 66 const sync_driver::SyncedSession* session);
68 }; 67 };
69 68
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 134
136 // Created lazily upon OnListenerAdded. 135 // Created lazily upon OnListenerAdded.
137 scoped_ptr<SessionsEventRouter> sessions_event_router_; 136 scoped_ptr<SessionsEventRouter> sessions_event_router_;
138 137
139 DISALLOW_COPY_AND_ASSIGN(SessionsAPI); 138 DISALLOW_COPY_AND_ASSIGN(SessionsAPI);
140 }; 139 };
141 140
142 } // namespace extensions 141 } // namespace extensions
143 142
144 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ 143 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698