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

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

Issue 2698833003: Fix the crash on clicking buttons in Bluetooth system menu in debug build. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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/common/system/chromeos/bluetooth/tray_bluetooth.h" 5 #include "ash/common/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/hover_highlight_view.h" 8 #include "ash/common/system/tray/hover_highlight_view.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/system/tray/system_tray_delegate.h" 10 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 UpdateClickedDevice(device_id, view); 447 UpdateClickedDevice(device_id, view);
448 delegate->ConnectToBluetoothDevice(device_id); 448 delegate->ConnectToBluetoothDevice(device_id);
449 } 449 }
450 450
451 void HandleButtonPressed(views::Button* sender, 451 void HandleButtonPressed(views::Button* sender,
452 const ui::Event& event) override { 452 const ui::Event& event) override {
453 if (sender == toggle_) 453 if (sender == toggle_)
454 WmShell::Get()->system_tray_delegate()->ToggleBluetooth(); 454 WmShell::Get()->system_tray_delegate()->ToggleBluetooth();
455 else if (sender == settings_) 455 else if (sender == settings_)
456 ShowSettings(); 456 ShowSettings();
457 457 else
458 NOTREACHED(); 458 NOTREACHED();
459 } 459 }
460 460
461 void CreateExtraTitleRowButtons() override { 461 void CreateExtraTitleRowButtons() override {
462 if (login_ == LoginStatus::LOCKED) 462 if (login_ == LoginStatus::LOCKED)
463 return; 463 return;
464 464
465 DCHECK(!toggle_); 465 DCHECK(!toggle_);
466 DCHECK(!settings_); 466 DCHECK(!settings_);
467 467
468 tri_view()->SetContainerVisible(TriView::Container::END, true); 468 tri_view()->SetContainerVisible(TriView::Container::END, true);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 detailed_->Update(); 618 detailed_->Update();
619 } 619 }
620 620
621 void TrayBluetooth::OnBluetoothDiscoveringChanged() { 621 void TrayBluetooth::OnBluetoothDiscoveringChanged() {
622 if (!detailed_) 622 if (!detailed_)
623 return; 623 return;
624 detailed_->Update(); 624 detailed_->Update();
625 } 625 }
626 626
627 } // namespace ash 627 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698