| 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/common/system/chromeos/bluetooth/tray_bluetooth.h" | 5 #include "ash/common/system/chromeos/bluetooth/tray_bluetooth.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" | 9 #include "ash/common/system/tray/fixed_sized_scroll_view.h" |
| 10 #include "ash/common/system/tray/hover_highlight_view.h" | 10 #include "ash/common/system/tray/hover_highlight_view.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 scroll_content()->SizeToPreferredSize(); | 325 scroll_content()->SizeToPreferredSize(); |
| 326 static_cast<views::View*>(scroller())->Layout(); | 326 static_cast<views::View*>(scroller())->Layout(); |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 // TrayDetailsView: | 330 // TrayDetailsView: |
| 331 void HandleViewClicked(views::View* view) override { | 331 void HandleViewClicked(views::View* view) override { |
| 332 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 332 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
| 333 if (view == manage_devices_) { | 333 if (view == manage_devices_) { |
| 334 delegate->ManageBluetoothDevices(); | 334 delegate->ManageBluetoothDevices(); |
| 335 owner()->system_tray()->CloseSystemBubble(); |
| 335 return; | 336 return; |
| 336 } | 337 } |
| 337 | 338 |
| 338 if (view == enable_bluetooth_) { | 339 if (view == enable_bluetooth_) { |
| 339 WmShell::Get()->RecordUserMetricsAction( | 340 WmShell::Get()->RecordUserMetricsAction( |
| 340 delegate->GetBluetoothEnabled() ? UMA_STATUS_AREA_BLUETOOTH_DISABLED | 341 delegate->GetBluetoothEnabled() ? UMA_STATUS_AREA_BLUETOOTH_DISABLED |
| 341 : UMA_STATUS_AREA_BLUETOOTH_ENABLED); | 342 : UMA_STATUS_AREA_BLUETOOTH_ENABLED); |
| 342 delegate->ToggleBluetooth(); | 343 delegate->ToggleBluetooth(); |
| 343 return; | 344 return; |
| 344 } | 345 } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 detailed_->Update(); | 484 detailed_->Update(); |
| 484 } | 485 } |
| 485 | 486 |
| 486 void TrayBluetooth::OnBluetoothDiscoveringChanged() { | 487 void TrayBluetooth::OnBluetoothDiscoveringChanged() { |
| 487 if (!detailed_) | 488 if (!detailed_) |
| 488 return; | 489 return; |
| 489 detailed_->Update(); | 490 detailed_->Update(); |
| 490 } | 491 } |
| 491 | 492 |
| 492 } // namespace ash | 493 } // namespace ash |
| OLD | NEW |