| OLD | NEW |
| 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/chromeos/bluetooth/tray_bluetooth.h" | 5 #include "ash/system/chromeos/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 8 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 9 #include "ash/common/system/tray/hover_highlight_view.h" | 9 #include "ash/common/system/tray/hover_highlight_view.h" |
| 10 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| 11 #include "ash/common/system/tray/system_tray_notifier.h" |
| 11 #include "ash/common/system/tray/throbber_view.h" | 12 #include "ash/common/system/tray/throbber_view.h" |
| 12 #include "ash/common/system/tray/tray_constants.h" | 13 #include "ash/common/system/tray/tray_constants.h" |
| 13 #include "ash/common/system/tray/tray_details_view.h" | 14 #include "ash/common/system/tray/tray_details_view.h" |
| 14 #include "ash/common/system/tray/tray_item_more.h" | 15 #include "ash/common/system/tray/tray_item_more.h" |
| 15 #include "ash/common/system/tray/tray_popup_header_button.h" | 16 #include "ash/common/system/tray/tray_popup_header_button.h" |
| 16 #include "ash/common/system/tray/view_click_listener.h" | 17 #include "ash/common/system/tray/view_click_listener.h" |
| 17 #include "ash/common/wm_shell.h" | 18 #include "ash/common/wm_shell.h" |
| 18 #include "ash/shell.h" | |
| 19 #include "ash/system/tray/system_tray.h" | 19 #include "ash/system/tray/system_tray.h" |
| 20 #include "ash/system/tray/system_tray_notifier.h" | |
| 21 #include "grit/ash_resources.h" | 20 #include "grit/ash_resources.h" |
| 22 #include "grit/ash_strings.h" | 21 #include "grit/ash_strings.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
| 26 #include "ui/views/controls/image_view.h" | 25 #include "ui/views/controls/image_view.h" |
| 27 #include "ui/views/controls/label.h" | 26 #include "ui/views/controls/label.h" |
| 28 #include "ui/views/layout/box_layout.h" | 27 #include "ui/views/layout/box_layout.h" |
| 29 | 28 |
| 30 namespace ash { | 29 namespace ash { |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 BluetoothDeviceList paired_not_connected_devices_; | 389 BluetoothDeviceList paired_not_connected_devices_; |
| 391 BluetoothDeviceList discovered_not_paired_devices_; | 390 BluetoothDeviceList discovered_not_paired_devices_; |
| 392 | 391 |
| 393 DISALLOW_COPY_AND_ASSIGN(BluetoothDetailedView); | 392 DISALLOW_COPY_AND_ASSIGN(BluetoothDetailedView); |
| 394 }; | 393 }; |
| 395 | 394 |
| 396 } // namespace tray | 395 } // namespace tray |
| 397 | 396 |
| 398 TrayBluetooth::TrayBluetooth(SystemTray* system_tray) | 397 TrayBluetooth::TrayBluetooth(SystemTray* system_tray) |
| 399 : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) { | 398 : SystemTrayItem(system_tray), default_(NULL), detailed_(NULL) { |
| 400 Shell::GetInstance()->system_tray_notifier()->AddBluetoothObserver(this); | 399 WmShell::Get()->system_tray_notifier()->AddBluetoothObserver(this); |
| 401 } | 400 } |
| 402 | 401 |
| 403 TrayBluetooth::~TrayBluetooth() { | 402 TrayBluetooth::~TrayBluetooth() { |
| 404 Shell::GetInstance()->system_tray_notifier()->RemoveBluetoothObserver(this); | 403 WmShell::Get()->system_tray_notifier()->RemoveBluetoothObserver(this); |
| 405 } | 404 } |
| 406 | 405 |
| 407 views::View* TrayBluetooth::CreateTrayView(LoginStatus status) { | 406 views::View* TrayBluetooth::CreateTrayView(LoginStatus status) { |
| 408 return NULL; | 407 return NULL; |
| 409 } | 408 } |
| 410 | 409 |
| 411 views::View* TrayBluetooth::CreateDefaultView(LoginStatus status) { | 410 views::View* TrayBluetooth::CreateDefaultView(LoginStatus status) { |
| 412 CHECK(default_ == NULL); | 411 CHECK(default_ == NULL); |
| 413 default_ = | 412 default_ = |
| 414 new tray::BluetoothDefaultView(this, status != LoginStatus::LOCKED); | 413 new tray::BluetoothDefaultView(this, status != LoginStatus::LOCKED); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 445 detailed_->Update(); | 444 detailed_->Update(); |
| 446 } | 445 } |
| 447 | 446 |
| 448 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 447 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 449 if (!detailed_) | 448 if (!detailed_) |
| 450 return; | 449 return; |
| 451 detailed_->Update(); | 450 detailed_->Update(); |
| 452 } | 451 } |
| 453 | 452 |
| 454 } // namespace ash | 453 } // namespace ash |
| OLD | NEW |