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

Side by Side Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 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
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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698