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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/shelf/shelf_tooltip_manager_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.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/shelf/shelf_view.h" 5 #include "ash/shelf/shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 button->ClearState(LauncherButton::STATE_RUNNING); 320 button->ClearState(LauncherButton::STATE_RUNNING);
321 button->AddState(LauncherButton::STATE_ATTENTION); 321 button->AddState(LauncherButton::STATE_ATTENTION);
322 break; 322 break;
323 } 323 }
324 } 324 }
325 325
326 // Get the event location in screen coordinates. 326 // Get the event location in screen coordinates.
327 gfx::Point GetPositionInScreen(const gfx::Point& root_location, 327 gfx::Point GetPositionInScreen(const gfx::Point& root_location,
328 views::View* view) { 328 views::View* view) {
329 gfx::Point root_location_in_screen = root_location; 329 gfx::Point root_location_in_screen = root_location;
330 aura::RootWindow* root_window = 330 aura::Window* root_window =
331 view->GetWidget()->GetNativeWindow()->GetRootWindow(); 331 view->GetWidget()->GetNativeWindow()->GetRootWindow();
332 aura::client::GetScreenPositionClient(root_window->GetRootWindow())-> 332 aura::client::GetScreenPositionClient(root_window->GetRootWindow())->
333 ConvertPointToScreen(root_window, &root_location_in_screen); 333 ConvertPointToScreen(root_window, &root_location_in_screen);
334 return root_location_in_screen; 334 return root_location_in_screen;
335 } 335 }
336 336
337 } // namespace 337 } // namespace
338 338
339 // AnimationDelegate used when deleting an item. This steadily decreased the 339 // AnimationDelegate used when deleting an item. This steadily decreased the
340 // opacity of the layer as the animation progress. 340 // opacity of the layer as the animation progress.
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 break; 1894 break;
1895 case ash::SHELF_ALIGNMENT_TOP: 1895 case ash::SHELF_ALIGNMENT_TOP:
1896 distance = coordinate.y() - bounds.bottom(); 1896 distance = coordinate.y() - bounds.bottom();
1897 break; 1897 break;
1898 } 1898 }
1899 return distance > 0 ? distance : 0; 1899 return distance > 0 ? distance : 0;
1900 } 1900 }
1901 1901
1902 } // namespace internal 1902 } // namespace internal
1903 } // namespace ash 1903 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_tooltip_manager_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698