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

Side by Side Diff: ash/system/network/tray_network.cc

Issue 2869053002: Merge NetworkListViewBase hierarchy and NetworkStateListDetailedView (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ash/system/network/tray_network.h ('k') | ash/system/network/tray_network_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ash/system/network/tray_network.h" 5 #include "ash/system/network/tray_network.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_port.h" 8 #include "ash/shell_port.h"
9 #include "ash/strings/grit/ash_strings.h" 9 #include "ash/strings/grit/ash_strings.h"
10 #include "ash/system/network/network_icon.h" 10 #include "ash/system/network/network_icon.h"
11 #include "ash/system/network/network_icon_animation.h" 11 #include "ash/system/network/network_icon_animation.h"
12 #include "ash/system/network/network_icon_animation_observer.h" 12 #include "ash/system/network/network_icon_animation_observer.h"
13 #include "ash/system/network/network_state_list_detailed_view.h" 13 #include "ash/system/network/network_list.h"
14 #include "ash/system/network/tray_network_state_observer.h" 14 #include "ash/system/network/tray_network_state_observer.h"
15 #include "ash/system/system_notifier.h" 15 #include "ash/system/system_notifier.h"
16 #include "ash/system/tray/system_tray.h" 16 #include "ash/system/tray/system_tray.h"
17 #include "ash/system/tray/system_tray_delegate.h" 17 #include "ash/system/tray/system_tray_delegate.h"
18 #include "ash/system/tray/system_tray_notifier.h" 18 #include "ash/system/tray/system_tray_notifier.h"
19 #include "ash/system/tray/tray_constants.h" 19 #include "ash/system/tray/tray_constants.h"
20 #include "ash/system/tray/tray_item_more.h" 20 #include "ash/system/tray/tray_item_more.h"
21 #include "ash/system/tray/tray_item_view.h" 21 #include "ash/system/tray/tray_item_view.h"
22 #include "ash/system/tray/tray_popup_item_style.h" 22 #include "ash/system/tray/tray_popup_item_style.h"
23 #include "ash/system/tray/tray_utils.h" 23 #include "ash/system/tray/tray_utils.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 default_->SetEnabled(status != LoginStatus::LOCKED); 239 default_->SetEnabled(status != LoginStatus::LOCKED);
240 return default_; 240 return default_;
241 } 241 }
242 242
243 views::View* TrayNetwork::CreateDetailedView(LoginStatus status) { 243 views::View* TrayNetwork::CreateDetailedView(LoginStatus status) {
244 CHECK(detailed_ == NULL); 244 CHECK(detailed_ == NULL);
245 ShellPort::Get()->RecordUserMetricsAction( 245 ShellPort::Get()->RecordUserMetricsAction(
246 UMA_STATUS_AREA_DETAILED_NETWORK_VIEW); 246 UMA_STATUS_AREA_DETAILED_NETWORK_VIEW);
247 if (!chromeos::NetworkHandler::IsInitialized()) 247 if (!chromeos::NetworkHandler::IsInitialized())
248 return NULL; 248 return NULL;
249 detailed_ = new tray::NetworkStateListDetailedView( 249 detailed_ = new tray::NetworkListView(this, status);
250 this, tray::NetworkStateListDetailedView::LIST_TYPE_NETWORK, status);
251 detailed_->Init(); 250 detailed_->Init();
252 return detailed_; 251 return detailed_;
253 } 252 }
254 253
255 void TrayNetwork::DestroyTrayView() { 254 void TrayNetwork::DestroyTrayView() {
256 tray_ = NULL; 255 tray_ = NULL;
257 } 256 }
258 257
259 void TrayNetwork::DestroyDefaultView() { 258 void TrayNetwork::DestroyDefaultView() {
260 default_ = NULL; 259 default_ = NULL;
(...skipping 27 matching lines...) Expand all
288 void TrayNetwork::NetworkStateChanged() { 287 void TrayNetwork::NetworkStateChanged() {
289 if (tray_) 288 if (tray_)
290 tray_->UpdateNetworkStateHandlerIcon(); 289 tray_->UpdateNetworkStateHandlerIcon();
291 if (default_) 290 if (default_)
292 default_->Update(); 291 default_->Update();
293 if (detailed_) 292 if (detailed_)
294 detailed_->Update(); 293 detailed_->Update();
295 } 294 }
296 295
297 } // namespace ash 296 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/network/tray_network.h ('k') | ash/system/network/tray_network_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698