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

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

Issue 2200993004: Make TabRestoreService::Entry noncopyable and fix up surrounding code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab-test-cleanup
Patch Set: Eliminate a use-after-free, Windows build fix Created 4 years, 4 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 24 matching lines...) Expand all
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
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__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698