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

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

Issue 174513003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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 "chrome/browser/extensions/api/profile_keyed_api_factory.h"
11 #include "chrome/browser/extensions/chrome_extension_function.h" 10 #include "chrome/browser/extensions/chrome_extension_function.h"
12 #include "chrome/browser/sessions/tab_restore_service.h" 11 #include "chrome/browser/sessions/tab_restore_service.h"
13 #include "chrome/browser/sessions/tab_restore_service_observer.h" 12 #include "chrome/browser/sessions/tab_restore_service_observer.h"
14 #include "chrome/common/extensions/api/sessions.h" 13 #include "chrome/common/extensions/api/sessions.h"
15 #include "chrome/common/extensions/api/tabs.h" 14 #include "chrome/common/extensions/api/tabs.h"
16 #include "chrome/common/extensions/api/windows.h" 15 #include "chrome/common/extensions/api/windows.h"
17 16
18 class Profile; 17 class Profile;
19 18
20 namespace browser_sync { 19 namespace browser_sync {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 private: 72 private:
74 void SetInvalidIdError(const std::string& invalid_id); 73 void SetInvalidIdError(const std::string& invalid_id);
75 void SetResultRestoredTab(const content::WebContents* contents); 74 void SetResultRestoredTab(const content::WebContents* contents);
76 bool SetResultRestoredWindow(int window_id); 75 bool SetResultRestoredWindow(int window_id);
77 bool RestoreMostRecentlyClosed(Browser* browser); 76 bool RestoreMostRecentlyClosed(Browser* browser);
78 bool RestoreLocalSession(const SessionId& session_id, Browser* browser); 77 bool RestoreLocalSession(const SessionId& session_id, Browser* browser);
79 bool RestoreForeignSession(const SessionId& session_id, 78 bool RestoreForeignSession(const SessionId& session_id,
80 Browser* browser); 79 Browser* browser);
81 }; 80 };
82 81
83 class SessionsAPI : public ProfileKeyedAPI {
84 public:
85 explicit SessionsAPI(Profile* profile);
86 virtual ~SessionsAPI();
87
88 // ProfileKeyedAPI implementation.
89 static ProfileKeyedAPIFactory<SessionsAPI>* GetFactoryInstance();
90 private:
91 friend class ProfileKeyedAPIFactory<SessionsAPI>;
92
93 // ProfileKeyedAPI implementation.
94 static const char* service_name() {
95 return "SessionsAPI";
96 }
97 static const bool kServiceIsNULLWhileTesting = true;
98 };
99
100 } // namespace extensions 82 } // namespace extensions
101 83
102 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__ 84 #endif // CHROME_BROWSER_EXTENSIONS_API_SESSIONS_SESSIONS_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698