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

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

Issue 5620004: chromeos: Show onscreen bubble when brightness changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos
Patch Set: update comment Created 10 years 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 #include "chrome/browser/chromeos/cros/cros_library.h" 5 #include "chrome/browser/chromeos/cros/cros_library.h"
6 6
7 #include "chrome/browser/chromeos/cros/brightness_library.h"
7 #include "chrome/browser/chromeos/cros/burn_library.h" 8 #include "chrome/browser/chromeos/cros/burn_library.h"
8 #include "chrome/browser/chromeos/cros/cros_library_loader.h" 9 #include "chrome/browser/chromeos/cros/cros_library_loader.h"
9 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 10 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
10 #include "chrome/browser/chromeos/cros/input_method_library.h" 11 #include "chrome/browser/chromeos/cros/input_method_library.h"
11 #include "chrome/browser/chromeos/cros/keyboard_library.h" 12 #include "chrome/browser/chromeos/cros/keyboard_library.h"
12 #include "chrome/browser/chromeos/cros/login_library.h" 13 #include "chrome/browser/chromeos/cros/login_library.h"
13 #include "chrome/browser/chromeos/cros/mount_library.h" 14 #include "chrome/browser/chromeos/cros/mount_library.h"
14 #include "chrome/browser/chromeos/cros/network_library.h" 15 #include "chrome/browser/chromeos/cros/network_library.h"
15 #include "chrome/browser/chromeos/cros/power_library.h" 16 #include "chrome/browser/chromeos/cros/power_library.h"
16 #include "chrome/browser/chromeos/cros/screen_lock_library.h" 17 #include "chrome/browser/chromeos/cros/screen_lock_library.h"
(...skipping 16 matching lines...) Expand all
33 CrosLibrary::~CrosLibrary() { 34 CrosLibrary::~CrosLibrary() {
34 if (own_library_loader_) 35 if (own_library_loader_)
35 delete library_loader_; 36 delete library_loader_;
36 } 37 }
37 38
38 // static 39 // static
39 CrosLibrary* CrosLibrary::Get() { 40 CrosLibrary* CrosLibrary::Get() {
40 return Singleton<CrosLibrary>::get(); 41 return Singleton<CrosLibrary>::get();
41 } 42 }
42 43
44 BrightnessLibrary* CrosLibrary::GetBrightnessLibrary() {
45 return brightness_lib_.GetDefaultImpl(use_stub_impl_);
46 }
47
43 BurnLibrary* CrosLibrary::GetBurnLibrary() { 48 BurnLibrary* CrosLibrary::GetBurnLibrary() {
44 return burn_lib_.GetDefaultImpl(use_stub_impl_); 49 return burn_lib_.GetDefaultImpl(use_stub_impl_);
45 } 50 }
46 51
47 CryptohomeLibrary* CrosLibrary::GetCryptohomeLibrary() { 52 CryptohomeLibrary* CrosLibrary::GetCryptohomeLibrary() {
48 return crypto_lib_.GetDefaultImpl(use_stub_impl_); 53 return crypto_lib_.GetDefaultImpl(use_stub_impl_);
49 } 54 }
50 55
51 KeyboardLibrary* CrosLibrary::GetKeyboardLibrary() { 56 KeyboardLibrary* CrosLibrary::GetKeyboardLibrary() {
52 return keyboard_lib_.GetDefaultImpl(use_stub_impl_); 57 return keyboard_lib_.GetDefaultImpl(use_stub_impl_);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (library_->own_library_loader_) 136 if (library_->own_library_loader_)
132 delete library_->library_loader_; 137 delete library_->library_loader_;
133 library_->own_library_loader_ = own; 138 library_->own_library_loader_ = own;
134 library_->library_loader_ = loader; 139 library_->library_loader_ = loader;
135 // Reset load flags when loader changes. Otherwise some tests are really not 140 // Reset load flags when loader changes. Otherwise some tests are really not
136 // going to be happy. 141 // going to be happy.
137 library_->loaded_ = false; 142 library_->loaded_ = false;
138 library_->load_error_ = false; 143 library_->load_error_ = false;
139 } 144 }
140 145
146 void CrosLibrary::TestApi::SetBrightnessLibrary(
147 BrightnessLibrary* library, bool own) {
148 library_->brightness_lib_.SetImpl(library, own);
149 }
150
141 void CrosLibrary::TestApi::SetBurnLibrary( 151 void CrosLibrary::TestApi::SetBurnLibrary(
142 BurnLibrary* library, bool own) { 152 BurnLibrary* library, bool own) {
143 library_->burn_lib_.SetImpl(library, own); 153 library_->burn_lib_.SetImpl(library, own);
144 } 154 }
145 155
146 void CrosLibrary::TestApi::SetCryptohomeLibrary( 156 void CrosLibrary::TestApi::SetCryptohomeLibrary(
147 CryptohomeLibrary* library, bool own) { 157 CryptohomeLibrary* library, bool own) {
148 library_->crypto_lib_.SetImpl(library, own); 158 library_->crypto_lib_.SetImpl(library, own);
149 } 159 }
150 160
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 SystemLibrary* library, bool own) { 212 SystemLibrary* library, bool own) {
203 library_->system_lib_.SetImpl(library, own); 213 library_->system_lib_.SetImpl(library, own);
204 } 214 }
205 215
206 void CrosLibrary::TestApi::SetUpdateLibrary( 216 void CrosLibrary::TestApi::SetUpdateLibrary(
207 UpdateLibrary* library, bool own) { 217 UpdateLibrary* library, bool own) {
208 library_->update_lib_.SetImpl(library, own); 218 library_->update_lib_.SetImpl(library, own);
209 } 219 }
210 220
211 } // namespace chromeos 221 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698