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

Side by Side Diff: chrome/browser/chromeos/status/network_menu_button.h

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "app/throb_animation.h"
12 #include "base/timer.h" 11 #include "base/timer.h"
13 #include "chrome/browser/chromeos/cros/network_library.h" 12 #include "chrome/browser/chromeos/cros/network_library.h"
14 #include "chrome/browser/chromeos/status/network_menu.h" 13 #include "chrome/browser/chromeos/status/network_menu.h"
15 #include "chrome/browser/chromeos/status/status_area_button.h" 14 #include "chrome/browser/chromeos/status/status_area_button.h"
15 #include "ui/base/animation/throb_animation.h"
16 16
17 namespace gfx { 17 namespace gfx {
18 class Canvas; 18 class Canvas;
19 } 19 }
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 class StatusAreaHost; 23 class StatusAreaHost;
24 24
25 // The network menu button in the status area. 25 // The network menu button in the status area.
(...skipping 22 matching lines...) Expand all
48 // The label will be BOLD if the network is currently connected. 48 // The label will be BOLD if the network is currently connected.
49 class NetworkMenuButton : public StatusAreaButton, 49 class NetworkMenuButton : public StatusAreaButton,
50 public NetworkMenu, 50 public NetworkMenu,
51 public NetworkLibrary::NetworkManagerObserver, 51 public NetworkLibrary::NetworkManagerObserver,
52 public NetworkLibrary::NetworkObserver, 52 public NetworkLibrary::NetworkObserver,
53 public NetworkLibrary::CellularDataPlanObserver { 53 public NetworkLibrary::CellularDataPlanObserver {
54 public: 54 public:
55 explicit NetworkMenuButton(StatusAreaHost* host); 55 explicit NetworkMenuButton(StatusAreaHost* host);
56 virtual ~NetworkMenuButton(); 56 virtual ~NetworkMenuButton();
57 57
58 // AnimationDelegate implementation. 58 // ui::AnimationDelegate implementation.
59 virtual void AnimationProgressed(const Animation* animation); 59 virtual void AnimationProgressed(const ui::Animation* animation);
60 60
61 // NetworkLibrary::NetworkManagerObserver implementation. 61 // NetworkLibrary::NetworkManagerObserver implementation.
62 virtual void OnNetworkManagerChanged(NetworkLibrary* cros); 62 virtual void OnNetworkManagerChanged(NetworkLibrary* cros);
63 // NetworkLibrary::NetworkObserver implementation. 63 // NetworkLibrary::NetworkObserver implementation.
64 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network); 64 virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network);
65 // NetworkLibrary::CellularDataPlanObserver implementation. 65 // NetworkLibrary::CellularDataPlanObserver implementation.
66 virtual void OnCellularDataPlanChanged(NetworkLibrary* cros); 66 virtual void OnCellularDataPlanChanged(NetworkLibrary* cros);
67 67
68 // Sets the badge icon. 68 // Sets the badge icon.
69 void SetBadge(const SkBitmap& badge) { badge_ = badge; } 69 void SetBadge(const SkBitmap& badge) { badge_ = badge; }
(...skipping 16 matching lines...) Expand all
86 // old network observer and add a network observer for the active network. 86 // old network observer and add a network observer for the active network.
87 void RefreshNetworkObserver(NetworkLibrary* cros); 87 void RefreshNetworkObserver(NetworkLibrary* cros);
88 88
89 // The status area host, 89 // The status area host,
90 StatusAreaHost* host_; 90 StatusAreaHost* host_;
91 91
92 // A badge icon displayed on top of the icon. 92 // A badge icon displayed on top of the icon.
93 SkBitmap badge_; 93 SkBitmap badge_;
94 94
95 // The throb animation that does the wifi connecting animation. 95 // The throb animation that does the wifi connecting animation.
96 ThrobAnimation animation_connecting_; 96 ui::ThrobAnimation animation_connecting_;
97 97
98 // The duration of the icon throbbing in milliseconds. 98 // The duration of the icon throbbing in milliseconds.
99 static const int kThrobDuration; 99 static const int kThrobDuration;
100 100
101 // If any network is currently active, this is the service path of the one 101 // If any network is currently active, this is the service path of the one
102 // whose status is displayed in the network menu button. 102 // whose status is displayed in the network menu button.
103 std::string active_network_; 103 std::string active_network_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); 105 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton);
106 }; 106 };
107 107
108 } // namespace chromeos 108 } // namespace chromeos
109 109
110 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ 110 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_dropdown_button.cc ('k') | chrome/browser/chromeos/status/network_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698