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

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

Issue 7778043: [cros] Support global carrier config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/task.h" 11 #include "base/task.h"
12 #include "base/timer.h" 12 #include "base/timer.h"
13 #include "chrome/browser/chromeos/cros/network_library.h" 13 #include "chrome/browser/chromeos/cros/network_library.h"
14 #include "chrome/browser/chromeos/customization_document.h"
15 #include "chrome/browser/chromeos/login/message_bubble.h" 14 #include "chrome/browser/chromeos/login/message_bubble.h"
15 #include "chrome/browser/chromeos/mobile_config.h"
16 #include "chrome/browser/chromeos/status/network_menu.h" 16 #include "chrome/browser/chromeos/status/network_menu.h"
17 #include "chrome/browser/chromeos/status/network_menu_icon.h" 17 #include "chrome/browser/chromeos/status/network_menu_icon.h"
18 #include "chrome/browser/chromeos/status/status_area_button.h" 18 #include "chrome/browser/chromeos/status/status_area_button.h"
19 19
20 class PrefService; 20 class PrefService;
21 21
22 namespace gfx { 22 namespace gfx {
23 class Canvas; 23 class Canvas;
24 } 24 }
25 25
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // views::ViewMenuDelegate implementation. 95 // views::ViewMenuDelegate implementation.
96 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE; 96 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
97 97
98 // MessageBubbleDelegate implementation: 98 // MessageBubbleDelegate implementation:
99 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE; 99 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
100 virtual bool CloseOnEscape() OVERRIDE; 100 virtual bool CloseOnEscape() OVERRIDE;
101 virtual bool FadeInOnShow() OVERRIDE; 101 virtual bool FadeInOnShow() OVERRIDE;
102 virtual void OnLinkActivated(size_t index) OVERRIDE; 102 virtual void OnLinkActivated(size_t index) OVERRIDE;
103 103
104 private: 104 private:
105 // Returns carrier info.
106 const MobileConfig::Carrier* GetCarrier(NetworkLibrary* cros);
107
105 // Returns carrier deal if it's specified and should be shown, 108 // Returns carrier deal if it's specified and should be shown,
106 // otherwise returns NULL. 109 // otherwise returns NULL.
107 const ServicesCustomizationDocument::CarrierDeal* GetCarrierDeal( 110 const MobileConfig::CarrierDeal* GetCarrierDeal(
108 NetworkLibrary* cros); 111 const MobileConfig::Carrier* carrier);
109 112
110 // Set the network icon based on the status of the |network| 113 // Set the network icon based on the status of the |network|
111 void SetNetworkIcon(); 114 void SetNetworkIcon();
112 115
113 // Called when the list of devices has possibly changed. This will remove 116 // Called when the list of devices has possibly changed. This will remove
114 // old network device observers and add a network observers 117 // old network device observers and add a network observers
115 // for the new devices. 118 // for the new devices.
116 void RefreshNetworkDeviceObserver(NetworkLibrary* cros); 119 void RefreshNetworkDeviceObserver(NetworkLibrary* cros);
117 120
118 // Called when the active network has possibly changed. This will remove 121 // Called when the active network has possibly changed. This will remove
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 161
159 // Factory for delaying showing promo notification. 162 // Factory for delaying showing promo notification.
160 ScopedRunnableMethodFactory<NetworkMenuButton> method_factory_; 163 ScopedRunnableMethodFactory<NetworkMenuButton> method_factory_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton); 165 DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton);
163 }; 166 };
164 167
165 } // namespace chromeos 168 } // namespace chromeos
166 169
167 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_ 170 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.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