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

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

Issue 2522613004: Revert of chromeos: Convert ash VPNDelegate interface to mojo (Closed)
Patch Set: 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"
62 #include "chrome/browser/ui/browser.h" 63 #include "chrome/browser/ui/browser.h"
63 #include "chrome/browser/ui/browser_list.h" 64 #include "chrome/browser/ui/browser_list.h"
64 #include "chrome/browser/ui/chrome_pages.h" 65 #include "chrome/browser/ui/chrome_pages.h"
65 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" 66 #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
66 #include "chrome/browser/ui/singleton_tabs.h" 67 #include "chrome/browser/ui/singleton_tabs.h"
67 #include "chrome/browser/upgrade_detector.h" 68 #include "chrome/browser/upgrade_detector.h"
68 #include "chrome/common/chrome_switches.h" 69 #include "chrome/common/chrome_switches.h"
69 #include "chrome/common/features.h" 70 #include "chrome/common/features.h"
70 #include "chrome/common/pref_names.h" 71 #include "chrome/common/pref_names.h"
71 #include "chrome/common/url_constants.h" 72 #include "chrome/common/url_constants.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return ash::WmShell::Get() 138 return ash::WmShell::Get()
138 ->GetSessionStateDelegate() 139 ->GetSessionStateDelegate()
139 ->IsInSecondaryLoginScreen(); 140 ->IsInSecondaryLoginScreen();
140 } 141 }
141 142
142 } // namespace 143 } // namespace
143 144
144 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() 145 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS()
145 : cast_config_delegate_(base::MakeUnique<CastConfigDelegateMediaRouter>()), 146 : cast_config_delegate_(base::MakeUnique<CastConfigDelegateMediaRouter>()),
146 networking_config_delegate_(new NetworkingConfigDelegateChromeos()), 147 networking_config_delegate_(new NetworkingConfigDelegateChromeos()),
148 vpn_delegate_(new VPNDelegateChromeOS),
147 weak_ptr_factory_(this) { 149 weak_ptr_factory_(this) {
148 // Register notifications on construction so that events such as 150 // Register notifications on construction so that events such as
149 // PROFILE_CREATED do not get missed if they happen before Initialize(). 151 // PROFILE_CREATED do not get missed if they happen before Initialize().
150 registrar_.reset(new content::NotificationRegistrar); 152 registrar_.reset(new content::NotificationRegistrar);
151 registrar_->Add(this, 153 registrar_->Add(this,
152 chrome::NOTIFICATION_UPGRADE_RECOMMENDED, 154 chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
153 content::NotificationService::AllSources()); 155 content::NotificationService::AllSources());
154 registrar_->Add(this, 156 registrar_->Add(this,
155 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, 157 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
156 content::NotificationService::AllSources()); 158 content::NotificationService::AllSources());
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 void SystemTrayDelegateChromeOS::AddCustodianInfoTrayObserver( 583 void SystemTrayDelegateChromeOS::AddCustodianInfoTrayObserver(
582 ash::CustodianInfoTrayObserver* observer) { 584 ash::CustodianInfoTrayObserver* observer) {
583 custodian_info_changed_observers_.AddObserver(observer); 585 custodian_info_changed_observers_.AddObserver(observer);
584 } 586 }
585 587
586 void SystemTrayDelegateChromeOS::RemoveCustodianInfoTrayObserver( 588 void SystemTrayDelegateChromeOS::RemoveCustodianInfoTrayObserver(
587 ash::CustodianInfoTrayObserver* observer) { 589 ash::CustodianInfoTrayObserver* observer) {
588 custodian_info_changed_observers_.RemoveObserver(observer); 590 custodian_info_changed_observers_.RemoveObserver(observer);
589 } 591 }
590 592
593 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const {
594 return vpn_delegate_.get();
595 }
596
591 std::unique_ptr<ash::SystemTrayItem> 597 std::unique_ptr<ash::SystemTrayItem>
592 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) { 598 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) {
593 return base::MakeUnique<ash::TrayRotationLock>(tray); 599 return base::MakeUnique<ash::TrayRotationLock>(tray);
594 } 600 }
595 601
596 void SystemTrayDelegateChromeOS::UserAddedToSession( 602 void SystemTrayDelegateChromeOS::UserAddedToSession(
597 const user_manager::User* active_user) { 603 const user_manager::User* active_user) {
598 } 604 }
599 605
600 void SystemTrayDelegateChromeOS::ActiveUserChanged( 606 void SystemTrayDelegateChromeOS::ActiveUserChanged(
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1006 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1001 << "ENABLE_SUPERVISED_USERS undefined."; 1007 << "ENABLE_SUPERVISED_USERS undefined.";
1002 return base::string16(); 1008 return base::string16();
1003 } 1009 }
1004 1010
1005 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1011 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1006 return new SystemTrayDelegateChromeOS(); 1012 return new SystemTrayDelegateChromeOS();
1007 } 1013 }
1008 1014
1009 } // namespace chromeos 1015 } // 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