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

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

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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/shell.cc ('k') | ash/tooltips/tooltip_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/audio/tray_volume.h" 10 #include "ash/system/audio/tray_volume.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 virtual gfx::Rect GetAnchorRect() OVERRIDE { 322 virtual gfx::Rect GetAnchorRect() OVERRIDE {
323 views::Widget* widget = tray_->GetWidget(); 323 views::Widget* widget = tray_->GetWidget();
324 if (widget->IsVisible()) { 324 if (widget->IsVisible()) {
325 gfx::Rect rect = widget->GetWindowScreenBounds(); 325 gfx::Rect rect = widget->GetWindowScreenBounds();
326 rect.Inset( 326 rect.Inset(
327 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : 0, 0, 327 base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : 0, 0,
328 base::i18n::IsRTL() ? 0 : kPaddingFromRightEdgeOfScreen, 328 base::i18n::IsRTL() ? 0 : kPaddingFromRightEdgeOfScreen,
329 kPaddingFromBottomOfScreen); 329 kPaddingFromBottomOfScreen);
330 return rect; 330 return rect;
331 } 331 }
332 gfx::Rect rect = gfx::Screen::GetPrimaryMonitorBounds(); 332 gfx::Rect rect = gfx::Screen::GetPrimaryMonitor().bounds();
333 return gfx::Rect(base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen : 333 return gfx::Rect(base::i18n::IsRTL() ? kPaddingFromRightEdgeOfScreen :
334 rect.width() - kPaddingFromRightEdgeOfScreen, 334 rect.width() - kPaddingFromRightEdgeOfScreen,
335 rect.height() - kPaddingFromBottomOfScreen, 335 rect.height() - kPaddingFromBottomOfScreen,
336 0, 0); 336 0, 0);
337 } 337 }
338 338
339 // Overridden from views::View. 339 // Overridden from views::View.
340 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE { 340 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
341 if (can_activate_) { 341 if (can_activate_) {
342 state->role = ui::AccessibilityTypes::ROLE_WINDOW; 342 state->role = ui::AccessibilityTypes::ROLE_WINDOW;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 popup_->Hide(); 704 popup_->Hide();
705 } 705 }
706 } 706 }
707 return base::EVENT_CONTINUE; 707 return base::EVENT_CONTINUE;
708 } 708 }
709 709
710 void SystemTray::DidProcessEvent(const base::NativeEvent& event) { 710 void SystemTray::DidProcessEvent(const base::NativeEvent& event) {
711 } 711 }
712 712
713 } // namespace ash 713 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/tooltips/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698