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

Side by Side Diff: ash/system/chromeos/network/tray_vpn.h

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified CL to provide TrayItems and Tray*Views with parent pointers instead. Created 8 years, 1 month 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 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
7 7
8 #include "ash/system/chromeos/network/network_observer.h" 8 #include "ash/system/chromeos/network/network_observer.h"
9 #include "ash/system/tray/system_tray_item.h" 9 #include "ash/system/tray/system_tray_item.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace ash { 12 namespace ash {
13
14 class SystemTray;
15
13 namespace internal { 16 namespace internal {
14 17
15 namespace tray { 18 namespace tray {
16 class NetworkDetailedView; 19 class NetworkDetailedView;
17 class VpnDefaultView; 20 class VpnDefaultView;
18 class VpnDetailedView; 21 class VpnDetailedView;
19 } 22 }
20 23
21 class TrayVPN : public SystemTrayItem, 24 class TrayVPN : public SystemTrayItem,
22 public NetworkObserver { 25 public NetworkObserver {
23 public: 26 public:
24 TrayVPN(); 27 explicit TrayVPN(SystemTray* system_tray);
25 virtual ~TrayVPN(); 28 virtual ~TrayVPN();
26 29
27 // Overridden from SystemTrayItem. 30 // Overridden from SystemTrayItem.
28 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; 31 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
29 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; 32 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
30 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; 33 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
31 virtual views::View* CreateNotificationView( 34 virtual views::View* CreateNotificationView(
32 user::LoginStatus status) OVERRIDE; 35 user::LoginStatus status) OVERRIDE;
33 virtual void DestroyTrayView() OVERRIDE; 36 virtual void DestroyTrayView() OVERRIDE;
34 virtual void DestroyDefaultView() OVERRIDE; 37 virtual void DestroyDefaultView() OVERRIDE;
(...skipping 17 matching lines...) Expand all
52 tray::VpnDefaultView* default_; 55 tray::VpnDefaultView* default_;
53 tray::NetworkDetailedView* detailed_; 56 tray::NetworkDetailedView* detailed_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(TrayVPN); 58 DISALLOW_COPY_AND_ASSIGN(TrayVPN);
56 }; 59 };
57 60
58 } // namespace internal 61 } // namespace internal
59 } // namespace ash 62 } // namespace ash
60 63
61 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H 64 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698