| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // Made available for tests. | 215 // Made available for tests. |
| 216 internal::ShadowController* shadow_controller() { | 216 internal::ShadowController* shadow_controller() { |
| 217 return shadow_controller_.get(); | 217 return shadow_controller_.get(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 static void set_compact_window_mode_for_test(bool compact) { | 220 static void set_compact_window_mode_for_test(bool compact) { |
| 221 compact_window_mode_for_test_ = compact; | 221 compact_window_mode_for_test_ = compact; |
| 222 } | 222 } |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, MouseEventCursors); |
| 226 FRIEND_TEST_ALL_PREFIXES(RootWindowEventFilterTest, TransformActivate); |
| 227 |
| 225 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; | 228 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; |
| 226 | 229 |
| 227 explicit Shell(ShellDelegate* delegate); | 230 explicit Shell(ShellDelegate* delegate); |
| 228 virtual ~Shell(); | 231 virtual ~Shell(); |
| 229 | 232 |
| 230 void Init(); | 233 void Init(); |
| 231 | 234 |
| 232 // Returns the appropriate window mode to use based on the |command_line| | 235 // Returns the appropriate window mode to use based on the |command_line| |
| 233 // and |compact_window_mode_for_test_|. | 236 // and |compact_window_mode_for_test_|. |
| 234 WindowMode ComputeWindowMode(CommandLine* command_line) const; | 237 WindowMode ComputeWindowMode(CommandLine* command_line) const; |
| 235 | 238 |
| 236 // Initializes or re-initializes the layout managers and event filters needed | 239 // Initializes or re-initializes the layout managers and event filters needed |
| 237 // to support a given window mode and cleans up the unneeded ones. | 240 // to support a given window mode and cleans up the unneeded ones. |
| 238 void SetupCompactWindowMode(); | 241 void SetupCompactWindowMode(); |
| 239 void SetupNonCompactWindowMode(); | 242 void SetupNonCompactWindowMode(); |
| 240 | 243 |
| 241 // Sets the LayoutManager of the container with the specified id to NULL. This | 244 // Sets the LayoutManager of the container with the specified id to NULL. This |
| 242 // has the effect of deleting the current LayoutManager. | 245 // has the effect of deleting the current LayoutManager. |
| 243 void ResetLayoutManager(int container_id); | 246 void ResetLayoutManager(int container_id); |
| 244 | 247 |
| 248 // Disables the workspace grid layout. |
| 249 void DisableWorkspaceGridLayout(); |
| 250 |
| 245 static Shell* instance_; | 251 static Shell* instance_; |
| 246 | 252 |
| 247 // Window mode is computed at shell initialization time, so allow it to be | 253 // Window mode is computed at shell initialization time, so allow it to be |
| 248 // overridden without modifying the global command line. | 254 // overridden without modifying the global command line. |
| 249 static bool compact_window_mode_for_test_; | 255 static bool compact_window_mode_for_test_; |
| 250 | 256 |
| 251 // If set before the Shell is initialized, the mouse cursor will be hidden | 257 // If set before the Shell is initialized, the mouse cursor will be hidden |
| 252 // when the screen is initially created. | 258 // when the screen is initially created. |
| 253 static bool initially_hide_cursor_; | 259 static bool initially_hide_cursor_; |
| 254 | 260 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 // Offset between the corner of the status area and the corner of the screen | 328 // Offset between the corner of the status area and the corner of the screen |
| 323 // when in the compact window mode. | 329 // when in the compact window mode. |
| 324 gfx::Size compact_status_area_offset_; | 330 gfx::Size compact_status_area_offset_; |
| 325 | 331 |
| 326 DISALLOW_COPY_AND_ASSIGN(Shell); | 332 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 327 }; | 333 }; |
| 328 | 334 |
| 329 } // namespace ash | 335 } // namespace ash |
| 330 | 336 |
| 331 #endif // ASH_SHELL_H_ | 337 #endif // ASH_SHELL_H_ |
| OLD | NEW |