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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 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 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 70 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
71 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 71 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
72 #include "chrome/browser/chromeos/settings/cros_settings.h" 72 #include "chrome/browser/chromeos/settings/cros_settings.h"
73 #include "chrome/browser/chromeos/sim_dialog_delegate.h" 73 #include "chrome/browser/chromeos/sim_dialog_delegate.h"
74 #include "chrome/browser/drive/drive_service_interface.h" 74 #include "chrome/browser/drive/drive_service_interface.h"
75 #include "chrome/browser/feedback/tracing_manager.h" 75 #include "chrome/browser/feedback/tracing_manager.h"
76 #include "chrome/browser/google/google_util.h" 76 #include "chrome/browser/google/google_util.h"
77 #include "chrome/browser/lifetime/application_lifetime.h" 77 #include "chrome/browser/lifetime/application_lifetime.h"
78 #include "chrome/browser/profiles/profile_manager.h" 78 #include "chrome/browser/profiles/profile_manager.h"
79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 79 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
80 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h"
80 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 81 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
81 #include "chrome/browser/ui/browser.h" 82 #include "chrome/browser/ui/browser.h"
82 #include "chrome/browser/ui/browser_finder.h" 83 #include "chrome/browser/ui/browser_finder.h"
83 #include "chrome/browser/ui/browser_list.h" 84 #include "chrome/browser/ui/browser_list.h"
84 #include "chrome/browser/ui/chrome_pages.h" 85 #include "chrome/browser/ui/chrome_pages.h"
85 #include "chrome/browser/ui/host_desktop.h" 86 #include "chrome/browser/ui/host_desktop.h"
86 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 87 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
87 #include "chrome/browser/ui/singleton_tabs.h" 88 #include "chrome/browser/ui/singleton_tabs.h"
88 #include "chrome/browser/ui/tabs/tab_strip_model.h" 89 #include "chrome/browser/ui/tabs/tab_strip_model.h"
89 #include "chrome/browser/ui/webui/chromeos/charger_replacement_handler.h" 90 #include "chrome/browser/ui/webui/chromeos/charger_replacement_handler.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 const std::string& service_path) const { 908 const std::string& service_path) const {
908 NetworkPortalDetector::CaptivePortalState state = 909 NetworkPortalDetector::CaptivePortalState state =
909 NetworkPortalDetector::Get()->GetCaptivePortalState(service_path); 910 NetworkPortalDetector::Get()->GetCaptivePortalState(service_path);
910 return state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL; 911 return state.status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_PORTAL;
911 } 912 }
912 913
913 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() { 914 bool SystemTrayDelegateChromeOS::IsSearchKeyMappedToCapsLock() {
914 return search_key_mapped_to_ == input_method::kCapsLockKey; 915 return search_key_mapped_to_ == input_method::kCapsLockKey;
915 } 916 }
916 917
918 ash::tray::UserAccountsDelegate*
919 SystemTrayDelegateChromeOS::GetUserAccountsDelegate(
920 const std::string& user_id) {
921 if (!accounts_delegates_.contains(user_id)) {
922 // TODO(dzhioev): replace stub with real implementation.
923 accounts_delegates_.set(user_id,
924 scoped_ptr<ash::tray::UserAccountsDelegate>(
925 new StubUserAccountsDelegate(user_id)));
926 static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
927 ->AddAccount("secondary_account1@gmail.com");
928 static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
929 ->AddAccount("very_long_account_name_for_user@gmail.com");
930 static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
931 ->AddAccount("secondary_account2@gmail.com");
932 static_cast<StubUserAccountsDelegate*>(accounts_delegates_.get(user_id))
933 ->AddAccount("very_very_very_long_account_name_for_user@gmail.com");
934 }
935 return accounts_delegates_.get(user_id);
936 }
937
917 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() { 938 ash::SystemTray* SystemTrayDelegateChromeOS::GetPrimarySystemTray() {
918 return ash::Shell::GetInstance()->GetPrimarySystemTray(); 939 return ash::Shell::GetInstance()->GetPrimarySystemTray();
919 } 940 }
920 941
921 ash::SystemTrayNotifier* SystemTrayDelegateChromeOS::GetSystemTrayNotifier() { 942 ash::SystemTrayNotifier* SystemTrayDelegateChromeOS::GetSystemTrayNotifier() {
922 return ash::Shell::GetInstance()->system_tray_notifier(); 943 return ash::Shell::GetInstance()->system_tray_notifier();
923 } 944 }
924 945
925 void SystemTrayDelegateChromeOS::SetProfile(Profile* profile) { 946 void SystemTrayDelegateChromeOS::SetProfile(Profile* profile) {
926 // Stop observing the Drive integration status and the AppWindowRegistry of 947 // Stop observing the Drive integration status and the AppWindowRegistry of
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 accessibility_subscription_.reset(); 1419 accessibility_subscription_.reset();
1399 else 1420 else
1400 OnAccessibilityModeChanged(details.notify); 1421 OnAccessibilityModeChanged(details.notify);
1401 } 1422 }
1402 1423
1403 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1424 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1404 return new SystemTrayDelegateChromeOS(); 1425 return new SystemTrayDelegateChromeOS();
1405 } 1426 }
1406 1427
1407 } // namespace chromeos 1428 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698