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

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

Issue 2513673004: Reland: chromeos: Convert ash VPNDelegate interface to mojo (Closed)
Patch Set: fix manifest for reland Created 4 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 52 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
53 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 53 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
54 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 54 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
55 #include "chrome/browser/chromeos/profiles/profile_helper.h" 55 #include "chrome/browser/chromeos/profiles/profile_helper.h"
56 #include "chrome/browser/profiles/profile_manager.h" 56 #include "chrome/browser/profiles/profile_manager.h"
57 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h" 57 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
58 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 58 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
59 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" 59 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h"
60 #include "chrome/browser/ui/ash/system_tray_client.h" 60 #include "chrome/browser/ui/ash/system_tray_client.h"
61 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h" 61 #include "chrome/browser/ui/ash/system_tray_delegate_utils.h"
62 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h"
63 #include "chrome/browser/ui/browser.h" 62 #include "chrome/browser/ui/browser.h"
64 #include "chrome/browser/ui/browser_list.h" 63 #include "chrome/browser/ui/browser_list.h"
65 #include "chrome/browser/ui/chrome_pages.h" 64 #include "chrome/browser/ui/chrome_pages.h"
66 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 65 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
67 #include "chrome/browser/ui/singleton_tabs.h" 66 #include "chrome/browser/ui/singleton_tabs.h"
68 #include "chrome/browser/upgrade_detector.h" 67 #include "chrome/browser/upgrade_detector.h"
69 #include "chrome/common/chrome_switches.h" 68 #include "chrome/common/chrome_switches.h"
70 #include "chrome/common/features.h" 69 #include "chrome/common/features.h"
71 #include "chrome/common/pref_names.h" 70 #include "chrome/common/pref_names.h"
72 #include "chrome/common/url_constants.h" 71 #include "chrome/common/url_constants.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return ash::WmShell::Get() 137 return ash::WmShell::Get()
139 ->GetSessionStateDelegate() 138 ->GetSessionStateDelegate()
140 ->IsInSecondaryLoginScreen(); 139 ->IsInSecondaryLoginScreen();
141 } 140 }
142 141
143 } // namespace 142 } // namespace
144 143
145 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() 144 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS()
146 : cast_config_delegate_(base::MakeUnique<CastConfigDelegateMediaRouter>()), 145 : cast_config_delegate_(base::MakeUnique<CastConfigDelegateMediaRouter>()),
147 networking_config_delegate_(new NetworkingConfigDelegateChromeos()), 146 networking_config_delegate_(new NetworkingConfigDelegateChromeos()),
148 vpn_delegate_(new VPNDelegateChromeOS),
149 weak_ptr_factory_(this) { 147 weak_ptr_factory_(this) {
150 // Register notifications on construction so that events such as 148 // Register notifications on construction so that events such as
151 // PROFILE_CREATED do not get missed if they happen before Initialize(). 149 // PROFILE_CREATED do not get missed if they happen before Initialize().
152 registrar_.reset(new content::NotificationRegistrar); 150 registrar_.reset(new content::NotificationRegistrar);
153 registrar_->Add(this, 151 registrar_->Add(this,
154 chrome::NOTIFICATION_UPGRADE_RECOMMENDED, 152 chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
155 content::NotificationService::AllSources()); 153 content::NotificationService::AllSources());
156 registrar_->Add(this, 154 registrar_->Add(this,
157 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, 155 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
158 content::NotificationService::AllSources()); 156 content::NotificationService::AllSources());
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 void SystemTrayDelegateChromeOS::AddCustodianInfoTrayObserver( 581 void SystemTrayDelegateChromeOS::AddCustodianInfoTrayObserver(
584 ash::CustodianInfoTrayObserver* observer) { 582 ash::CustodianInfoTrayObserver* observer) {
585 custodian_info_changed_observers_.AddObserver(observer); 583 custodian_info_changed_observers_.AddObserver(observer);
586 } 584 }
587 585
588 void SystemTrayDelegateChromeOS::RemoveCustodianInfoTrayObserver( 586 void SystemTrayDelegateChromeOS::RemoveCustodianInfoTrayObserver(
589 ash::CustodianInfoTrayObserver* observer) { 587 ash::CustodianInfoTrayObserver* observer) {
590 custodian_info_changed_observers_.RemoveObserver(observer); 588 custodian_info_changed_observers_.RemoveObserver(observer);
591 } 589 }
592 590
593 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const {
594 return vpn_delegate_.get();
595 }
596
597 std::unique_ptr<ash::SystemTrayItem> 591 std::unique_ptr<ash::SystemTrayItem>
598 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) { 592 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) {
599 return base::MakeUnique<ash::TrayRotationLock>(tray); 593 return base::MakeUnique<ash::TrayRotationLock>(tray);
600 } 594 }
601 595
602 void SystemTrayDelegateChromeOS::UserAddedToSession( 596 void SystemTrayDelegateChromeOS::UserAddedToSession(
603 const user_manager::User* active_user) { 597 const user_manager::User* active_user) {
604 } 598 }
605 599
606 void SystemTrayDelegateChromeOS::ActiveUserChanged( 600 void SystemTrayDelegateChromeOS::ActiveUserChanged(
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1000 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1007 << "ENABLE_SUPERVISED_USERS undefined."; 1001 << "ENABLE_SUPERVISED_USERS undefined.";
1008 return base::string16(); 1002 return base::string16();
1009 } 1003 }
1010 1004
1011 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1005 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1012 return new SystemTrayDelegateChromeOS(); 1006 return new SystemTrayDelegateChromeOS();
1013 } 1007 }
1014 1008
1015 } // namespace chromeos 1009 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/vpn_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698