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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 9570013: Activate the status area only when it's focused using the keyboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new FocusCycler tests Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/status_area/status_area_view.cc ('k') | ash/wm/activation_controller.cc » ('j') | 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/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 bubble_->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 341 bubble_->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
342 popup_->non_client_view()->frame_view()->set_background(NULL); 342 popup_->non_client_view()->frame_view()->set_background(NULL);
343 popup_->non_client_view()->frame_view()->set_border( 343 popup_->non_client_view()->frame_view()->set_border(
344 new SystemTrayBubbleBorder(bubble_)); 344 new SystemTrayBubbleBorder(bubble_));
345 popup_->AddObserver(this); 345 popup_->AddObserver(this);
346 bubble_->Show(); 346 bubble_->Show();
347 } 347 }
348 348
349 bool SystemTray::OnMousePressed(const views::MouseEvent& event) { 349 bool SystemTray::OnMousePressed(const views::MouseEvent& event) {
350 if (popup_) 350 if (popup_)
351 popup_->Show(); 351 popup_->Hide();
352 else 352 else
353 ShowItems(items_, false); 353 ShowItems(items_, false);
354 return true; 354 return true;
355 } 355 }
356 356
357 void SystemTray::OnMouseEntered(const views::MouseEvent& event) { 357 void SystemTray::OnMouseEntered(const views::MouseEvent& event) {
358 static_cast<SystemTrayBackground*>(background())->set_hovering(true); 358 static_cast<SystemTrayBackground*>(background())->set_hovering(true);
359 SchedulePaint(); 359 SchedulePaint();
360 } 360 }
361 361
362 void SystemTray::OnMouseExited(const views::MouseEvent& event) { 362 void SystemTray::OnMouseExited(const views::MouseEvent& event) {
363 static_cast<SystemTrayBackground*>(background())->set_hovering(false); 363 static_cast<SystemTrayBackground*>(background())->set_hovering(false);
364 SchedulePaint(); 364 SchedulePaint();
365 } 365 }
366 366
367 void SystemTray::OnWidgetClosing(views::Widget* widget) { 367 void SystemTray::OnWidgetClosing(views::Widget* widget) {
368 CHECK_EQ(popup_, widget); 368 CHECK_EQ(popup_, widget);
369 popup_ = NULL; 369 popup_ = NULL;
370 bubble_ = NULL; 370 bubble_ = NULL;
371 } 371 }
372 372
373 } // namespace ash 373 } // namespace ash
OLDNEW
« no previous file with comments | « ash/status_area/status_area_view.cc ('k') | ash/wm/activation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698