| OLD | NEW |
| 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 #ifndef ASH_SHELL_H_ | 5 #ifndef ASH_SHELL_H_ |
| 6 #define ASH_SHELL_H_ | 6 #define ASH_SHELL_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 static aura::RootWindow* GetRootWindowAt(const gfx::Point& point); | 171 static aura::RootWindow* GetRootWindowAt(const gfx::Point& point); |
| 172 | 172 |
| 173 // Returns the RootWindow that shares the most area with |rect| in | 173 // Returns the RootWindow that shares the most area with |rect| in |
| 174 // the virtual scren coordinates. | 174 // the virtual scren coordinates. |
| 175 static aura::RootWindow* GetRootWindowMatching(const gfx::Rect& rect); | 175 static aura::RootWindow* GetRootWindowMatching(const gfx::Rect& rect); |
| 176 | 176 |
| 177 // Returns all root windows. In non extended desktop mode, this | 177 // Returns all root windows. In non extended desktop mode, this |
| 178 // returns the primary root window only. | 178 // returns the primary root window only. |
| 179 static RootWindowList GetAllRootWindows(); | 179 static RootWindowList GetAllRootWindows(); |
| 180 | 180 |
| 181 // If |location_in_root| is inside |root_window|'s bounds, just returns a pair |
| 182 // of |root_window| and |location_in_root| as-is. If |location_in_root| is |
| 183 // outside the |root_window|, the function tries to find another root window |
| 184 // where the cursor is on and returns a pair of the window and location in the |
| 185 // window's coordinates. |
| 186 static std::pair<aura::RootWindow*, gfx::Point> NormalizeLocationInDragEvent( |
| 187 aura::RootWindow* root_window, |
| 188 gfx::Point location_in_root); |
| 189 |
| 181 static aura::Window* GetContainer(aura::RootWindow* root_window, | 190 static aura::Window* GetContainer(aura::RootWindow* root_window, |
| 182 int container_id); | 191 int container_id); |
| 183 | 192 |
| 184 // Returns the list of containers that match |container_id| in | 193 // Returns the list of containers that match |container_id| in |
| 185 // all root windows. | 194 // all root windows. |
| 186 static std::vector<aura::Window*> GetAllContainers(int container_id); | 195 static std::vector<aura::Window*> GetAllContainers(int container_id); |
| 187 | 196 |
| 188 void set_active_root_window(aura::RootWindow* active_root_window) { | 197 void set_active_root_window(aura::RootWindow* active_root_window) { |
| 189 active_root_window_ = active_root_window; | 198 active_root_window_ = active_root_window; |
| 190 } | 199 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 495 |
| 487 // Used by ash/shell. | 496 // Used by ash/shell. |
| 488 content::BrowserContext* browser_context_; | 497 content::BrowserContext* browser_context_; |
| 489 | 498 |
| 490 DISALLOW_COPY_AND_ASSIGN(Shell); | 499 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 491 }; | 500 }; |
| 492 | 501 |
| 493 } // namespace ash | 502 } // namespace ash |
| 494 | 503 |
| 495 #endif // ASH_SHELL_H_ | 504 #endif // ASH_SHELL_H_ |
| OLD | NEW |