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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10828385: Rename DocumentsServiceInterface to DriveServiceInterface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unnecessary includes. Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 17 matching lines...) Expand all
28 #include "base/logging.h" 28 #include "base/logging.h"
29 #include "base/memory/weak_ptr.h" 29 #include "base/memory/weak_ptr.h"
30 #include "base/utf_string_conversions.h" 30 #include "base/utf_string_conversions.h"
31 #include "chrome/browser/browser_process.h" 31 #include "chrome/browser/browser_process.h"
32 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 32 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
33 #include "chrome/browser/chromeos/audio/audio_handler.h" 33 #include "chrome/browser/chromeos/audio/audio_handler.h"
34 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" 34 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
35 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" 35 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
36 #include "chrome/browser/chromeos/cros/cros_library.h" 36 #include "chrome/browser/chromeos/cros/cros_library.h"
37 #include "chrome/browser/chromeos/cros/network_library.h" 37 #include "chrome/browser/chromeos/cros/network_library.h"
38 #include "chrome/browser/chromeos/gdata/documents_service_interface.h" 38 #include "chrome/browser/chromeos/gdata/drive_service_interface.h"
39 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" 39 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h"
40 #include "chrome/browser/chromeos/gdata/gdata_system_service.h" 40 #include "chrome/browser/chromeos/gdata/gdata_system_service.h"
41 #include "chrome/browser/chromeos/gdata/gdata_util.h" 41 #include "chrome/browser/chromeos/gdata/gdata_util.h"
42 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 42 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
43 #include "chrome/browser/chromeos/input_method/input_method_util.h" 43 #include "chrome/browser/chromeos/input_method/input_method_util.h"
44 #include "chrome/browser/chromeos/input_method/xkeyboard.h" 44 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
45 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 45 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
46 #include "chrome/browser/chromeos/login/base_login_display_host.h" 46 #include "chrome/browser/chromeos/login/base_login_display_host.h"
47 #include "chrome/browser/chromeos/login/login_display_host.h" 47 #include "chrome/browser/chromeos/login/login_display_host.h"
48 #include "chrome/browser/chromeos/login/message_bubble.h" 48 #include "chrome/browser/chromeos/login/message_bubble.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (SystemKeyEventListener::GetInstance()) 235 if (SystemKeyEventListener::GetInstance())
236 SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this); 236 SystemKeyEventListener::GetInstance()->RemoveCapsLockObserver(this);
237 bluetooth_adapter_->RemoveObserver(this); 237 bluetooth_adapter_->RemoveObserver(this);
238 238
239 // Stop observing gdata operations. 239 // Stop observing gdata operations.
240 Profile* profile = ProfileManager::GetDefaultProfile(); 240 Profile* profile = ProfileManager::GetDefaultProfile();
241 if (gdata::util::IsGDataAvailable(profile)) { 241 if (gdata::util::IsGDataAvailable(profile)) {
242 GDataSystemService* system_service = 242 GDataSystemService* system_service =
243 GDataSystemServiceFactory::FindForProfile(profile); 243 GDataSystemServiceFactory::FindForProfile(profile);
244 if (system_service) { 244 if (system_service) {
245 system_service->docs_service()->operation_registry()-> 245 system_service->drive_service()->operation_registry()->
246 RemoveObserver(this); 246 RemoveObserver(this);
247 } 247 }
248 } 248 }
249 } 249 }
250 250
251 // Overridden from ash::SystemTrayDelegate: 251 // Overridden from ash::SystemTrayDelegate:
252 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { 252 virtual bool GetTrayVisibilityOnStartup() OVERRIDE {
253 // In case of OOBE / sign in screen tray will be shown later. 253 // In case of OOBE / sign in screen tray will be shown later.
254 return UserManager::Get()->IsUserLoggedIn(); 254 return UserManager::Get()->IsUserLoggedIn();
255 } 255 }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 virtual void CancelDriveOperation(const FilePath& file_path) OVERRIDE { 455 virtual void CancelDriveOperation(const FilePath& file_path) OVERRIDE {
456 Profile* profile = ProfileManager::GetDefaultProfile(); 456 Profile* profile = ProfileManager::GetDefaultProfile();
457 if (!gdata::util::IsGDataAvailable(profile)) 457 if (!gdata::util::IsGDataAvailable(profile))
458 return; 458 return;
459 459
460 GDataSystemService* system_service = 460 GDataSystemService* system_service =
461 GDataSystemServiceFactory::FindForProfile(profile); 461 GDataSystemServiceFactory::FindForProfile(profile);
462 if (!system_service) 462 if (!system_service)
463 return; 463 return;
464 464
465 system_service->docs_service()->operation_registry()->CancelForFilePath( 465 system_service->drive_service()->operation_registry()->CancelForFilePath(
466 file_path); 466 file_path);
467 } 467 }
468 468
469 virtual void GetDriveOperationStatusList( 469 virtual void GetDriveOperationStatusList(
470 ash::DriveOperationStatusList* list) OVERRIDE { 470 ash::DriveOperationStatusList* list) OVERRIDE {
471 Profile* profile = ProfileManager::GetDefaultProfile(); 471 Profile* profile = ProfileManager::GetDefaultProfile();
472 if (!gdata::util::IsGDataAvailable(profile)) 472 if (!gdata::util::IsGDataAvailable(profile))
473 return; 473 return;
474 474
475 GDataSystemService* system_service = 475 GDataSystemService* system_service =
476 GDataSystemServiceFactory::FindForProfile(profile); 476 GDataSystemServiceFactory::FindForProfile(profile);
477 if (!system_service) 477 if (!system_service)
478 return; 478 return;
479 479
480 *list = GetDriveStatusList( 480 *list = GetDriveStatusList(
481 system_service->docs_service()->operation_registry()-> 481 system_service->drive_service()->operation_registry()->
482 GetProgressStatusList()); 482 GetProgressStatusList());
483 } 483 }
484 484
485 485
486 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info, 486 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info,
487 bool dark) OVERRIDE { 487 bool dark) OVERRIDE {
488 NetworkMenuIcon* icon = 488 NetworkMenuIcon* icon =
489 dark ? network_icon_dark_.get() : network_icon_.get(); 489 dark ? network_icon_dark_.get() : network_icon_.get();
490 info->image = icon->GetIconAndText(&info->description); 490 info->image = icon->GetIconAndText(&info->description);
491 info->tray_icon_visible = icon->ShouldShowIconInTray(); 491 info->tray_icon_visible = icon->ShouldShowIconInTray();
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 UpdateClockType(profile->GetPrefs()); 736 UpdateClockType(profile->GetPrefs());
737 search_key_mapped_to_ = 737 search_key_mapped_to_ =
738 profile->GetPrefs()->GetInteger(prefs::kLanguageXkbRemapSearchKeyTo); 738 profile->GetPrefs()->GetInteger(prefs::kLanguageXkbRemapSearchKeyTo);
739 739
740 if (gdata::util::IsGDataAvailable(profile)) { 740 if (gdata::util::IsGDataAvailable(profile)) {
741 GDataSystemService* system_service = 741 GDataSystemService* system_service =
742 GDataSystemServiceFactory::FindForProfile(profile); 742 GDataSystemServiceFactory::FindForProfile(profile);
743 if (!system_service) 743 if (!system_service)
744 return; 744 return;
745 745
746 system_service->docs_service()->operation_registry()->AddObserver(this); 746 system_service->drive_service()->operation_registry()->AddObserver(this);
747 } 747 }
748 } 748 }
749 749
750 void UpdateClockType(PrefService* service) { 750 void UpdateClockType(PrefService* service) {
751 clock_type_ = service->GetBoolean(prefs::kUse24HourClock) ? 751 clock_type_ = service->GetBoolean(prefs::kUse24HourClock) ?
752 base::k24HourClock : base::k12HourClock; 752 base::k24HourClock : base::k12HourClock;
753 ash::ClockObserver* observer = tray_->clock_observer(); 753 ash::ClockObserver* observer = tray_->clock_observer();
754 if (observer) 754 if (observer)
755 observer->OnDateFormatChanged(); 755 observer->OnDateFormatChanged();
756 } 756 }
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 void RecheckGDataOperations() { 1132 void RecheckGDataOperations() {
1133 Profile* profile = ProfileManager::GetDefaultProfile(); 1133 Profile* profile = ProfileManager::GetDefaultProfile();
1134 if (!gdata::util::IsGDataAvailable(profile)) 1134 if (!gdata::util::IsGDataAvailable(profile))
1135 return; 1135 return;
1136 1136
1137 GDataSystemService* system_service = 1137 GDataSystemService* system_service =
1138 GDataSystemServiceFactory::FindForProfile(profile); 1138 GDataSystemServiceFactory::FindForProfile(profile);
1139 if (!system_service) 1139 if (!system_service)
1140 return; 1140 return;
1141 1141
1142 OnProgressUpdate(system_service->docs_service()->operation_registry()-> 1142 OnProgressUpdate(system_service->drive_service()->operation_registry()->
1143 GetProgressStatusList()); 1143 GetProgressStatusList());
1144 } 1144 }
1145 1145
1146 // Overridden from system::TimezoneSettings::Observer. 1146 // Overridden from system::TimezoneSettings::Observer.
1147 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE { 1147 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE {
1148 NotifyRefreshClock(); 1148 NotifyRefreshClock();
1149 } 1149 }
1150 1150
1151 // Overridden from BluetoothAdapter::Observer. 1151 // Overridden from BluetoothAdapter::Observer.
1152 virtual void AdapterPresentChanged(BluetoothAdapter* adapter, 1152 virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1254 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1255 }; 1255 };
1256 1256
1257 } // namespace 1257 } // namespace
1258 1258
1259 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1259 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1260 return new chromeos::SystemTrayDelegate(tray); 1260 return new chromeos::SystemTrayDelegate(tray);
1261 } 1261 }
1262 1262
1263 } // namespace chromeos 1263 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/operations_base.h ('k') | chrome/browser/ui/webui/chromeos/drive_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698