| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/system/network_selector.h" | 5 #include "athena/system/network_selector.h" |
| 6 | 6 |
| 7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chromeos/network/network_configuration_handler.h" | 9 #include "chromeos/network/network_configuration_handler.h" |
| 10 #include "chromeos/network/network_connection_handler.h" | 10 #include "chromeos/network/network_connection_handler.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE { | 305 virtual void OnGestureEvent(ui::GestureEvent* gesture) OVERRIDE { |
| 306 if (gesture->type() != ui::ET_GESTURE_TAP) | 306 if (gesture->type() != ui::ET_GESTURE_TAP) |
| 307 return; | 307 return; |
| 308 ActivateNetwork(); | 308 ActivateNetwork(); |
| 309 gesture->SetHandled(); | 309 gesture->SetHandled(); |
| 310 } | 310 } |
| 311 | 311 |
| 312 ui::NetworkInfo network_; | 312 ui::NetworkInfo network_; |
| 313 views::View* container_; | 313 views::View* container_; |
| 314 scoped_ptr<views::View> password_view_; |
| 314 base::WeakPtrFactory<NetworkRow> weak_ptr_; | 315 base::WeakPtrFactory<NetworkRow> weak_ptr_; |
| 315 scoped_ptr<views::View> password_view_; | |
| 316 | 316 |
| 317 DISALLOW_COPY_AND_ASSIGN(NetworkRow); | 317 DISALLOW_COPY_AND_ASSIGN(NetworkRow); |
| 318 }; | 318 }; |
| 319 | 319 |
| 320 class NetworkSelector : public ui::NetworkListDelegate, | 320 class NetworkSelector : public ui::NetworkListDelegate, |
| 321 public chromeos::NetworkStateHandlerObserver, | 321 public chromeos::NetworkStateHandlerObserver, |
| 322 public ui::EventHandler { | 322 public ui::EventHandler { |
| 323 public: | 323 public: |
| 324 explicit NetworkSelector(aura::Window* container) | 324 explicit NetworkSelector(aura::Window* container) |
| 325 : background_view_(NULL), | 325 : background_view_(NULL), |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 } // namespace | 461 } // namespace |
| 462 | 462 |
| 463 namespace athena { | 463 namespace athena { |
| 464 | 464 |
| 465 void CreateNetworkSelector(aura::Window* container) { | 465 void CreateNetworkSelector(aura::Window* container) { |
| 466 new NetworkSelector(container); | 466 new NetworkSelector(container); |
| 467 } | 467 } |
| 468 | 468 |
| 469 } // namespace athena | 469 } // namespace athena |
| OLD | NEW |