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

Side by Side Diff: ash/shelf/shelf.cc

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 years, 11 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/screen_util_unittest.cc ('k') | ash/shelf/shelf_layout_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shelf/shelf.h" 5 #include "ash/shelf/shelf.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/focus_cycler.h" 10 #include "ash/focus_cycler.h"
11 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
12 #include "ash/screen_ash.h" 12 #include "ash/screen_util.h"
13 #include "ash/shelf/shelf_delegate.h" 13 #include "ash/shelf/shelf_delegate.h"
14 #include "ash/shelf/shelf_item_delegate.h" 14 #include "ash/shelf/shelf_item_delegate.h"
15 #include "ash/shelf/shelf_item_delegate_manager.h" 15 #include "ash/shelf/shelf_item_delegate_manager.h"
16 #include "ash/shelf/shelf_layout_manager.h" 16 #include "ash/shelf/shelf_layout_manager.h"
17 #include "ash/shelf/shelf_model.h" 17 #include "ash/shelf/shelf_model.h"
18 #include "ash/shelf/shelf_navigator.h" 18 #include "ash/shelf/shelf_navigator.h"
19 #include "ash/shelf/shelf_util.h" 19 #include "ash/shelf/shelf_util.h"
20 #include "ash/shelf/shelf_view.h" 20 #include "ash/shelf/shelf_view.h"
21 #include "ash/shelf/shelf_widget.h" 21 #include "ash/shelf/shelf_widget.h"
22 #include "ash/shell.h" 22 #include "ash/shell.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 views::View::ConvertPointToScreen(shelf_view_, &screen_origin); 88 views::View::ConvertPointToScreen(shelf_view_, &screen_origin);
89 return gfx::Rect(screen_origin.x() + bounds.x(), 89 return gfx::Rect(screen_origin.x() + bounds.x(),
90 screen_origin.y() + bounds.y(), 90 screen_origin.y() + bounds.y(),
91 bounds.width(), 91 bounds.width(),
92 bounds.height()); 92 bounds.height());
93 } 93 }
94 94
95 void Shelf::UpdateIconPositionForWindow(aura::Window* window) { 95 void Shelf::UpdateIconPositionForWindow(aura::Window* window) {
96 shelf_view_->UpdatePanelIconPosition( 96 shelf_view_->UpdatePanelIconPosition(
97 GetLauncherIDForWindow(window), 97 GetLauncherIDForWindow(window),
98 ScreenAsh::ConvertRectFromScreen( 98 ScreenUtil::ConvertRectFromScreen(
99 shelf_widget()->GetNativeView(), 99 shelf_widget()->GetNativeView(),
100 window->GetBoundsInScreen()).CenterPoint()); 100 window->GetBoundsInScreen()).CenterPoint());
101 } 101 }
102 102
103 void Shelf::ActivateShelfItem(int index) { 103 void Shelf::ActivateShelfItem(int index) {
104 // We pass in a keyboard event which will then trigger a switch to the 104 // We pass in a keyboard event which will then trigger a switch to the
105 // next item if the current one is already active. 105 // next item if the current one is already active.
106 ui::KeyEvent event(ui::ET_KEY_RELEASED, 106 ui::KeyEvent event(ui::ET_KEY_RELEASED,
107 ui::VKEY_UNKNOWN, // The actual key gets ignored. 107 ui::VKEY_UNKNOWN, // The actual key gets ignored.
108 ui::EF_NONE, 108 ui::EF_NONE,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { 190 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const {
191 return shelf_view_->GetVisibleItemsBoundsInScreen(); 191 return shelf_view_->GetVisibleItemsBoundsInScreen();
192 } 192 }
193 193
194 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { 194 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() {
195 return shelf_view_; 195 return shelf_view_;
196 } 196 }
197 197
198 } // namespace ash 198 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_util_unittest.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698