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

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

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/vpn_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/vpn_delegate_chromeos.h"
6 6
7 #include "ash/common/system/tray/system_tray_delegate.h" 7 #include "ash/common/system/tray/system_tray_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/threading/thread_task_runner_handle.h" 12 #include "base/threading/thread_task_runner_handle.h"
13 #include "chrome/browser/chrome_notification_types.h" 13 #include "chrome/browser/chrome_notification_types.h"
14 #include "chrome/browser/chromeos/profiles/profile_helper.h" 14 #include "chrome/browser/chromeos/profiles/profile_helper.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "components/user_manager/user.h" 16 #include "components/user_manager/user.h"
17 #include "components/user_manager/user_manager.h" 17 #include "components/user_manager/user_manager.h"
18 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 const std::vector<ash::VPNProvider>& VPNDelegateChromeOS::GetVPNProviders() 75 const std::vector<ash::VPNProvider>& VPNDelegateChromeOS::GetVPNProviders()
76 const { 76 const {
77 return vpn_providers_; 77 return vpn_providers_;
78 } 78 }
79 79
80 void VPNDelegateChromeOS::ShowAddPage(const ash::VPNProvider::Key& key) { 80 void VPNDelegateChromeOS::ShowAddPage(const ash::VPNProvider::Key& key) {
81 if (!key.third_party) { 81 if (!key.third_party) {
82 // Show the "add network" dialog for the built-in OpenVPN/L2TP provider. 82 // Show the "add network" dialog for the built-in OpenVPN/L2TP provider.
83 ash::Shell::GetInstance()->system_tray_delegate()->ShowOtherNetworkDialog( 83 ash::WmShell::Get()->system_tray_delegate()->ShowOtherNetworkDialog(
84 shill::kTypeVPN); 84 shill::kTypeVPN);
85 return; 85 return;
86 } 86 }
87 87
88 Profile* const profile = GetProfileForPrimaryUser(); 88 Profile* const profile = GetProfileForPrimaryUser();
89 if (!profile) 89 if (!profile)
90 return; 90 return;
91 91
92 // Request that the third-party VPN provider identified by |key.extension_id| 92 // Request that the third-party VPN provider identified by |key.extension_id|
93 // show its "add network" dialog. 93 // show its "add network" dialog.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 void VPNDelegateChromeOS::AttachToPrimaryUserExtensionRegistry() { 162 void VPNDelegateChromeOS::AttachToPrimaryUserExtensionRegistry() {
163 DCHECK(!extension_registry_); 163 DCHECK(!extension_registry_);
164 extension_registry_ = 164 extension_registry_ =
165 extensions::ExtensionRegistry::Get(GetProfileForPrimaryUser()); 165 extensions::ExtensionRegistry::Get(GetProfileForPrimaryUser());
166 extension_registry_->AddObserver(this); 166 extension_registry_->AddObserver(this);
167 167
168 UpdateVPNProviders(); 168 UpdateVPNProviders();
169 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698