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

Side by Side Diff: ash/shell.h

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shell.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 #ifndef ASH_SHELL_H_ 5 #ifndef ASH_SHELL_H_
6 #define ASH_SHELL_H_ 6 #define ASH_SHELL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Called when a root window is created. 209 // Called when a root window is created.
210 void OnRootWindowAdded(WmWindow* root_window); 210 void OnRootWindowAdded(WmWindow* root_window);
211 211
212 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already 212 // Creates a virtual keyboard. Deletes the old virtual keyboard if it already
213 // exists. 213 // exists.
214 void CreateKeyboard(); 214 void CreateKeyboard();
215 215
216 // Deactivates the virtual keyboard. 216 // Deactivates the virtual keyboard.
217 void DeactivateKeyboard(); 217 void DeactivateKeyboard();
218 218
219 #if defined(OS_CHROMEOS)
220 // Test if MaximizeModeWindowManager is not enabled, and if 219 // Test if MaximizeModeWindowManager is not enabled, and if
221 // MaximizeModeController is not currently setting a display rotation. Or if 220 // MaximizeModeController is not currently setting a display rotation. Or if
222 // the |resolution_notification_controller_| is not showing its confirmation 221 // the |resolution_notification_controller_| is not showing its confirmation
223 // dialog. If true then changes to display settings can be saved. 222 // dialog. If true then changes to display settings can be saved.
224 bool ShouldSaveDisplaySettings(); 223 bool ShouldSaveDisplaySettings();
225 #endif
226 224
227 AcceleratorControllerDelegateAura* accelerator_controller_delegate() { 225 AcceleratorControllerDelegateAura* accelerator_controller_delegate() {
228 return accelerator_controller_delegate_.get(); 226 return accelerator_controller_delegate_.get();
229 } 227 }
230 228
231 display::DisplayManager* display_manager() { return display_manager_.get(); } 229 display::DisplayManager* display_manager() { return display_manager_.get(); }
232 DisplayConfigurationController* display_configuration_controller() { 230 DisplayConfigurationController* display_configuration_controller() {
233 return display_configuration_controller_.get(); 231 return display_configuration_controller_.get();
234 } 232 }
235 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); } 233 ::wm::CompoundEventFilter* env_filter() { return env_filter_.get(); }
(...skipping 11 matching lines...) Expand all
247 PowerButtonController* power_button_controller() { 245 PowerButtonController* power_button_controller() {
248 return power_button_controller_.get(); 246 return power_button_controller_.get();
249 } 247 }
250 LockStateController* lock_state_controller() { 248 LockStateController* lock_state_controller() {
251 return lock_state_controller_.get(); 249 return lock_state_controller_.get();
252 } 250 }
253 VideoDetector* video_detector() { return video_detector_.get(); } 251 VideoDetector* video_detector() { return video_detector_.get(); }
254 WindowTreeHostManager* window_tree_host_manager() { 252 WindowTreeHostManager* window_tree_host_manager() {
255 return window_tree_host_manager_.get(); 253 return window_tree_host_manager_.get();
256 } 254 }
257 #if defined(OS_CHROMEOS)
258 PowerEventObserver* power_event_observer() { 255 PowerEventObserver* power_event_observer() {
259 return power_event_observer_.get(); 256 return power_event_observer_.get();
260 } 257 }
261 TouchTransformerController* touch_transformer_controller() { 258 TouchTransformerController* touch_transformer_controller() {
262 return touch_transformer_controller_.get(); 259 return touch_transformer_controller_.get();
263 } 260 }
264 LaserPointerController* laser_pointer_controller() { 261 LaserPointerController* laser_pointer_controller() {
265 return laser_pointer_controller_.get(); 262 return laser_pointer_controller_.get();
266 } 263 }
267 PartialMagnificationController* partial_magnification_controller() { 264 PartialMagnificationController* partial_magnification_controller() {
268 return partial_magnification_controller_.get(); 265 return partial_magnification_controller_.get();
269 } 266 }
270 #endif // defined(OS_CHROMEOS)
271 ScreenshotController* screenshot_controller() { 267 ScreenshotController* screenshot_controller() {
272 return screenshot_controller_.get(); 268 return screenshot_controller_.get();
273 } 269 }
274 MouseCursorEventFilter* mouse_cursor_filter() { 270 MouseCursorEventFilter* mouse_cursor_filter() {
275 return mouse_cursor_filter_.get(); 271 return mouse_cursor_filter_.get();
276 } 272 }
277 EventTransformationHandler* event_transformation_handler() { 273 EventTransformationHandler* event_transformation_handler() {
278 return event_transformation_handler_.get(); 274 return event_transformation_handler_.get();
279 } 275 }
280 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); } 276 ::wm::CursorManager* cursor_manager() { return cursor_manager_.get(); }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 317 }
322 318
323 // Made available for tests. 319 // Made available for tests.
324 ::wm::ShadowController* shadow_controller() { 320 ::wm::ShadowController* shadow_controller() {
325 return shadow_controller_.get(); 321 return shadow_controller_.get();
326 } 322 }
327 323
328 // Starts the animation that occurs on first login. 324 // Starts the animation that occurs on first login.
329 void DoInitialWorkspaceAnimation(); 325 void DoInitialWorkspaceAnimation();
330 326
331 #if defined(OS_CHROMEOS)
332 // TODO(oshima): Move these objects to WindowTreeHostManager. 327 // TODO(oshima): Move these objects to WindowTreeHostManager.
333 display::DisplayConfigurator* display_configurator() { 328 display::DisplayConfigurator* display_configurator() {
334 return display_configurator_.get(); 329 return display_configurator_.get();
335 } 330 }
336 DisplayErrorObserver* display_error_observer() { 331 DisplayErrorObserver* display_error_observer() {
337 return display_error_observer_.get(); 332 return display_error_observer_.get();
338 } 333 }
339 334
340 ScreenLayoutObserver* screen_layout_observer() { 335 ScreenLayoutObserver* screen_layout_observer() {
341 return screen_layout_observer_.get(); 336 return screen_layout_observer_.get();
342 } 337 }
343 338
344 ResolutionNotificationController* resolution_notification_controller() { 339 ResolutionNotificationController* resolution_notification_controller() {
345 return resolution_notification_controller_.get(); 340 return resolution_notification_controller_.get();
346 } 341 }
347 342
348 ScreenOrientationController* screen_orientation_controller() { 343 ScreenOrientationController* screen_orientation_controller() {
349 return screen_orientation_controller_.get(); 344 return screen_orientation_controller_.get();
350 } 345 }
351 346
352 VirtualKeyboardController* virtual_keyboard_controller() { 347 VirtualKeyboardController* virtual_keyboard_controller() {
353 return virtual_keyboard_controller_.get(); 348 return virtual_keyboard_controller_.get();
354 } 349 }
355 350
356 chromeos::AudioA11yController* audio_a11y_controller() { 351 chromeos::AudioA11yController* audio_a11y_controller() {
357 return audio_a11y_controller_.get(); 352 return audio_a11y_controller_.get();
358 } 353 }
359 #endif // defined(OS_CHROMEOS)
360 354
361 WindowPositioner* window_positioner() { return window_positioner_.get(); } 355 WindowPositioner* window_positioner() { return window_positioner_.get(); }
362 356
363 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); } 357 UserMetricsRecorder* metrics() { return user_metrics_recorder_.get(); }
364 358
365 void SetTouchHudProjectionEnabled(bool enabled); 359 void SetTouchHudProjectionEnabled(bool enabled);
366 360
367 bool is_touch_hud_projection_enabled() const { 361 bool is_touch_hud_projection_enabled() const {
368 return is_touch_hud_projection_enabled_; 362 return is_touch_hud_projection_enabled_;
369 } 363 }
370 364
371 #if defined(OS_CHROMEOS)
372 // Creates instance of FirstRunHelper. Caller is responsible for deleting 365 // Creates instance of FirstRunHelper. Caller is responsible for deleting
373 // returned object. 366 // returned object.
374 ash::FirstRunHelper* CreateFirstRunHelper(); 367 ash::FirstRunHelper* CreateFirstRunHelper();
375 368
376 // Toggles cursor compositing on/off. Native cursor is disabled when cursor 369 // Toggles cursor compositing on/off. Native cursor is disabled when cursor
377 // compositing is enabled, and vice versa. 370 // compositing is enabled, and vice versa.
378 void SetCursorCompositingEnabled(bool enabled); 371 void SetCursorCompositingEnabled(bool enabled);
379 372
380 StickyKeysController* sticky_keys_controller() { 373 StickyKeysController* sticky_keys_controller() {
381 return sticky_keys_controller_.get(); 374 return sticky_keys_controller_.get();
382 } 375 }
383 376
384 #endif // defined(OS_CHROMEOS)
385
386 ScreenPinningController* screen_pinning_controller() { 377 ScreenPinningController* screen_pinning_controller() {
387 return screen_pinning_controller_.get(); 378 return screen_pinning_controller_.get();
388 } 379 }
389 380
390 GPUSupport* gpu_support() { return gpu_support_.get(); } 381 GPUSupport* gpu_support() { return gpu_support_.get(); }
391 382
392 private: 383 private:
393 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); 384 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor);
394 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); 385 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors);
395 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); 386 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 467
477 // An event filter that pre-handles global accelerators. 468 // An event filter that pre-handles global accelerators.
478 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_; 469 std::unique_ptr<::wm::AcceleratorFilter> accelerator_filter_;
479 470
480 std::unique_ptr<display::DisplayManager> display_manager_; 471 std::unique_ptr<display::DisplayManager> display_manager_;
481 std::unique_ptr<DisplayConfigurationController> 472 std::unique_ptr<DisplayConfigurationController>
482 display_configuration_controller_; 473 display_configuration_controller_;
483 474
484 std::unique_ptr<ScreenPinningController> screen_pinning_controller_; 475 std::unique_ptr<ScreenPinningController> screen_pinning_controller_;
485 476
486 #if defined(OS_CHROMEOS)
487 std::unique_ptr<PowerEventObserver> power_event_observer_; 477 std::unique_ptr<PowerEventObserver> power_event_observer_;
488 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_; 478 std::unique_ptr<ui::UserActivityPowerManagerNotifier> user_activity_notifier_;
489 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_; 479 std::unique_ptr<VideoActivityNotifier> video_activity_notifier_;
490 std::unique_ptr<StickyKeysController> sticky_keys_controller_; 480 std::unique_ptr<StickyKeysController> sticky_keys_controller_;
491 std::unique_ptr<ResolutionNotificationController> 481 std::unique_ptr<ResolutionNotificationController>
492 resolution_notification_controller_; 482 resolution_notification_controller_;
493 std::unique_ptr<BluetoothNotificationController> 483 std::unique_ptr<BluetoothNotificationController>
494 bluetooth_notification_controller_; 484 bluetooth_notification_controller_;
495 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_; 485 std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_;
496 std::unique_ptr<chromeos::AudioA11yController> audio_a11y_controller_; 486 std::unique_ptr<chromeos::AudioA11yController> audio_a11y_controller_;
(...skipping 13 matching lines...) Expand all
510 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_; 500 std::unique_ptr<ScreenOrientationController> screen_orientation_controller_;
511 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_; 501 std::unique_ptr<ScreenLayoutObserver> screen_layout_observer_;
512 502
513 std::unique_ptr<TouchTransformerController> touch_transformer_controller_; 503 std::unique_ptr<TouchTransformerController> touch_transformer_controller_;
514 504
515 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_; 505 std::unique_ptr<ui::EventHandler> magnifier_key_scroll_handler_;
516 std::unique_ptr<ui::EventHandler> speech_feedback_handler_; 506 std::unique_ptr<ui::EventHandler> speech_feedback_handler_;
517 std::unique_ptr<LaserPointerController> laser_pointer_controller_; 507 std::unique_ptr<LaserPointerController> laser_pointer_controller_;
518 std::unique_ptr<PartialMagnificationController> 508 std::unique_ptr<PartialMagnificationController>
519 partial_magnification_controller_; 509 partial_magnification_controller_;
520 #endif // defined(OS_CHROMEOS)
521 510
522 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a 511 // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a
523 // pointer to vend to test code. 512 // pointer to vend to test code.
524 AshNativeCursorManager* native_cursor_manager_; 513 AshNativeCursorManager* native_cursor_manager_;
525 514
526 // Cursor may be hidden on certain key events in ChromeOS, whereas we never 515 // Cursor may be hidden on certain key events in ChromeOS, whereas we never
527 // hide the cursor on Windows. 516 // hide the cursor on Windows.
528 std::unique_ptr<::wm::CursorManager> cursor_manager_; 517 std::unique_ptr<::wm::CursorManager> cursor_manager_;
529 518
530 // For testing only: simulate that a modal window is open 519 // For testing only: simulate that a modal window is open
531 bool simulate_modal_window_open_for_testing_; 520 bool simulate_modal_window_open_for_testing_;
532 521
533 bool is_touch_hud_projection_enabled_; 522 bool is_touch_hud_projection_enabled_;
534 523
535 // Injected content::GPUDataManager support. 524 // Injected content::GPUDataManager support.
536 std::unique_ptr<GPUSupport> gpu_support_; 525 std::unique_ptr<GPUSupport> gpu_support_;
537 526
538 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; 527 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_;
539 528
540 DISALLOW_COPY_AND_ASSIGN(Shell); 529 DISALLOW_COPY_AND_ASSIGN(Shell);
541 }; 530 };
542 531
543 } // namespace ash 532 } // namespace ash
544 533
545 #endif // ASH_SHELL_H_ 534 #endif // ASH_SHELL_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698