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

Side by Side Diff: chrome/browser/chromeos/cros/cros_library.h

Issue 6486007: Introducing ResumeLibrary to track system resume signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_CHROMEOS_CROS_CROS_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_CROS_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 class BurnLibrary; 22 class BurnLibrary;
23 class CryptohomeLibrary; 23 class CryptohomeLibrary;
24 class InputMethodLibrary; 24 class InputMethodLibrary;
25 class KeyboardLibrary; 25 class KeyboardLibrary;
26 class LibCrosServiceLibrary; 26 class LibCrosServiceLibrary;
27 class LibraryLoader; 27 class LibraryLoader;
28 class LoginLibrary; 28 class LoginLibrary;
29 class MountLibrary; 29 class MountLibrary;
30 class NetworkLibrary; 30 class NetworkLibrary;
31 class PowerLibrary; 31 class PowerLibrary;
32 class ResumeLibrary;
32 class ScreenLockLibrary; 33 class ScreenLockLibrary;
33 class SpeechSynthesisLibrary; 34 class SpeechSynthesisLibrary;
34 class SyslogsLibrary; 35 class SyslogsLibrary;
35 class SystemLibrary; 36 class SystemLibrary;
36 class TouchpadLibrary; 37 class TouchpadLibrary;
37 class UpdateLibrary; 38 class UpdateLibrary;
38 39
39 // This class handles access to sub-parts of ChromeOS library. it provides 40 // This class handles access to sub-parts of ChromeOS library. it provides
40 // a level of indirection so individual libraries that it exposes can 41 // a level of indirection so individual libraries that it exposes can
41 // be mocked for testing. 42 // be mocked for testing.
(...skipping 19 matching lines...) Expand all
61 void SetBrightnessLibrary(BrightnessLibrary* library, bool own); 62 void SetBrightnessLibrary(BrightnessLibrary* library, bool own);
62 void SetBurnLibrary(BurnLibrary* library, bool own); 63 void SetBurnLibrary(BurnLibrary* library, bool own);
63 void SetCryptohomeLibrary(CryptohomeLibrary* library, bool own); 64 void SetCryptohomeLibrary(CryptohomeLibrary* library, bool own);
64 void SetKeyboardLibrary(KeyboardLibrary* library, bool own); 65 void SetKeyboardLibrary(KeyboardLibrary* library, bool own);
65 void SetInputMethodLibrary(InputMethodLibrary* library, bool own); 66 void SetInputMethodLibrary(InputMethodLibrary* library, bool own);
66 void SetLibCrosServiceLibrary(LibCrosServiceLibrary* library, bool own); 67 void SetLibCrosServiceLibrary(LibCrosServiceLibrary* library, bool own);
67 void SetLoginLibrary(LoginLibrary* library, bool own); 68 void SetLoginLibrary(LoginLibrary* library, bool own);
68 void SetMountLibrary(MountLibrary* library, bool own); 69 void SetMountLibrary(MountLibrary* library, bool own);
69 void SetNetworkLibrary(NetworkLibrary* library, bool own); 70 void SetNetworkLibrary(NetworkLibrary* library, bool own);
70 void SetPowerLibrary(PowerLibrary* library, bool own); 71 void SetPowerLibrary(PowerLibrary* library, bool own);
72 void SetResumeLibrary(ResumeLibrary* library, bool own);
71 void SetScreenLockLibrary(ScreenLockLibrary* library, bool own); 73 void SetScreenLockLibrary(ScreenLockLibrary* library, bool own);
72 void SetSpeechSynthesisLibrary(SpeechSynthesisLibrary* library, bool own); 74 void SetSpeechSynthesisLibrary(SpeechSynthesisLibrary* library, bool own);
73 void SetSyslogsLibrary(SyslogsLibrary* library, bool own); 75 void SetSyslogsLibrary(SyslogsLibrary* library, bool own);
74 void SetSystemLibrary(SystemLibrary* library, bool own); 76 void SetSystemLibrary(SystemLibrary* library, bool own);
75 void SetTouchpadLibrary(TouchpadLibrary* library, bool own); 77 void SetTouchpadLibrary(TouchpadLibrary* library, bool own);
76 void SetUpdateLibrary(UpdateLibrary* library, bool own); 78 void SetUpdateLibrary(UpdateLibrary* library, bool own);
77 79
78 private: 80 private:
79 friend class CrosLibrary; 81 friend class CrosLibrary;
80 explicit TestApi(CrosLibrary* library) : library_(library) {} 82 explicit TestApi(CrosLibrary* library) : library_(library) {}
81 CrosLibrary* library_; 83 CrosLibrary* library_;
82 }; 84 };
83 85
84 // This gets the CrosLibrary. 86 // This gets the CrosLibrary.
85 static CrosLibrary* Get(); 87 static CrosLibrary* Get();
86 88
87 BrightnessLibrary* GetBrightnessLibrary(); 89 BrightnessLibrary* GetBrightnessLibrary();
88 BurnLibrary* GetBurnLibrary(); 90 BurnLibrary* GetBurnLibrary();
89 CryptohomeLibrary* GetCryptohomeLibrary(); 91 CryptohomeLibrary* GetCryptohomeLibrary();
90 InputMethodLibrary* GetInputMethodLibrary(); 92 InputMethodLibrary* GetInputMethodLibrary();
91 LibCrosServiceLibrary* GetLibCrosServiceLibrary(); 93 LibCrosServiceLibrary* GetLibCrosServiceLibrary();
92 KeyboardLibrary* GetKeyboardLibrary(); 94 KeyboardLibrary* GetKeyboardLibrary();
93 LoginLibrary* GetLoginLibrary(); 95 LoginLibrary* GetLoginLibrary();
94 MountLibrary* GetMountLibrary(); 96 MountLibrary* GetMountLibrary();
95 NetworkLibrary* GetNetworkLibrary(); 97 NetworkLibrary* GetNetworkLibrary();
96 PowerLibrary* GetPowerLibrary(); 98 PowerLibrary* GetPowerLibrary();
99 ResumeLibrary* GetResumeLibrary();
97 ScreenLockLibrary* GetScreenLockLibrary(); 100 ScreenLockLibrary* GetScreenLockLibrary();
98 SpeechSynthesisLibrary* GetSpeechSynthesisLibrary(); 101 SpeechSynthesisLibrary* GetSpeechSynthesisLibrary();
99 SyslogsLibrary* GetSyslogsLibrary(); 102 SyslogsLibrary* GetSyslogsLibrary();
100 SystemLibrary* GetSystemLibrary(); 103 SystemLibrary* GetSystemLibrary();
101 TouchpadLibrary* GetTouchpadLibrary(); 104 TouchpadLibrary* GetTouchpadLibrary();
102 UpdateLibrary* GetUpdateLibrary(); 105 UpdateLibrary* GetUpdateLibrary();
103 106
104 // Getter for Test API that gives access to internal members of this class. 107 // Getter for Test API that gives access to internal members of this class.
105 TestApi* GetTestApi(); 108 TestApi* GetTestApi();
106 109
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 Library<BrightnessLibrary> brightness_lib_; 167 Library<BrightnessLibrary> brightness_lib_;
165 Library<BurnLibrary> burn_lib_; 168 Library<BurnLibrary> burn_lib_;
166 Library<CryptohomeLibrary> crypto_lib_; 169 Library<CryptohomeLibrary> crypto_lib_;
167 Library<KeyboardLibrary> keyboard_lib_; 170 Library<KeyboardLibrary> keyboard_lib_;
168 Library<InputMethodLibrary> input_method_lib_; 171 Library<InputMethodLibrary> input_method_lib_;
169 Library<LibCrosServiceLibrary> libcros_service_lib_; 172 Library<LibCrosServiceLibrary> libcros_service_lib_;
170 Library<LoginLibrary> login_lib_; 173 Library<LoginLibrary> login_lib_;
171 Library<MountLibrary> mount_lib_; 174 Library<MountLibrary> mount_lib_;
172 Library<NetworkLibrary> network_lib_; 175 Library<NetworkLibrary> network_lib_;
173 Library<PowerLibrary> power_lib_; 176 Library<PowerLibrary> power_lib_;
177 Library<ResumeLibrary> resume_lib_;
174 Library<ScreenLockLibrary> screen_lock_lib_; 178 Library<ScreenLockLibrary> screen_lock_lib_;
175 Library<SpeechSynthesisLibrary> speech_synthesis_lib_; 179 Library<SpeechSynthesisLibrary> speech_synthesis_lib_;
176 Library<SyslogsLibrary> syslogs_lib_; 180 Library<SyslogsLibrary> syslogs_lib_;
177 Library<SystemLibrary> system_lib_; 181 Library<SystemLibrary> system_lib_;
178 Library<TouchpadLibrary> touchpad_lib_; 182 Library<TouchpadLibrary> touchpad_lib_;
179 Library<UpdateLibrary> update_lib_; 183 Library<UpdateLibrary> update_lib_;
180 184
181 // Stub implementations of the libraries should be used. 185 // Stub implementations of the libraries should be used.
182 bool use_stub_impl_; 186 bool use_stub_impl_;
183 // True if libcros was successfully loaded. 187 // True if libcros was successfully loaded.
(...skipping 19 matching lines...) Expand all
203 chromeos::CrosLibrary::Get()->GetTestApi()->ResetUseStubImpl(); 207 chromeos::CrosLibrary::Get()->GetTestApi()->ResetUseStubImpl();
204 } 208 }
205 209
206 private: 210 private:
207 DISALLOW_COPY_AND_ASSIGN(ScopedStubCrosEnabler); 211 DISALLOW_COPY_AND_ASSIGN(ScopedStubCrosEnabler);
208 }; 212 };
209 213
210 } // namespace chromeos 214 } // namespace chromeos
211 215
212 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_LIBRARY_H_ 216 #endif // CHROME_BROWSER_CHROMEOS_CROS_CROS_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_library.cc » ('j') | chrome/browser/chromeos/cros/resume_library.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698