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

Side by Side Diff: ash/shell.cc

Issue 11360045: ash: Add RootWindowHostFactory class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary braces and add missing windows_version.h include. Created 8 years 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/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
11 #include "ash/ash_switches.h" 11 #include "ash/ash_switches.h"
12 #include "ash/caps_lock_delegate.h" 12 #include "ash/caps_lock_delegate.h"
13 #include "ash/desktop_background/desktop_background_controller.h" 13 #include "ash/desktop_background/desktop_background_controller.h"
14 #include "ash/desktop_background/desktop_background_view.h" 14 #include "ash/desktop_background/desktop_background_view.h"
15 #include "ash/desktop_background/user_wallpaper_delegate.h" 15 #include "ash/desktop_background/user_wallpaper_delegate.h"
16 #include "ash/display/display_controller.h" 16 #include "ash/display/display_controller.h"
17 #include "ash/display/display_manager.h" 17 #include "ash/display/display_manager.h"
18 #include "ash/display/mouse_cursor_event_filter.h" 18 #include "ash/display/mouse_cursor_event_filter.h"
19 #include "ash/display/screen_position_controller.h" 19 #include "ash/display/screen_position_controller.h"
20 #include "ash/drag_drop/drag_drop_controller.h" 20 #include "ash/drag_drop/drag_drop_controller.h"
21 #include "ash/focus_cycler.h" 21 #include "ash/focus_cycler.h"
22 #include "ash/high_contrast/high_contrast_controller.h" 22 #include "ash/high_contrast/high_contrast_controller.h"
23 #include "ash/host/root_window_host_factory.h"
23 #include "ash/launcher/launcher_delegate.h" 24 #include "ash/launcher/launcher_delegate.h"
24 #include "ash/launcher/launcher_model.h" 25 #include "ash/launcher/launcher_model.h"
25 #include "ash/magnifier/magnification_controller.h" 26 #include "ash/magnifier/magnification_controller.h"
26 #include "ash/magnifier/partial_magnification_controller.h" 27 #include "ash/magnifier/partial_magnification_controller.h"
27 #include "ash/root_window_controller.h" 28 #include "ash/root_window_controller.h"
28 #include "ash/screen_ash.h" 29 #include "ash/screen_ash.h"
29 #include "ash/shell_delegate.h" 30 #include "ash/shell_delegate.h"
30 #include "ash/shell_factory.h" 31 #include "ash/shell_factory.h"
31 #include "ash/shell_window_ids.h" 32 #include "ash/shell_window_ids.h"
32 #include "ash/system/status_area_widget.h" 33 #include "ash/system/status_area_widget.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 new internal::ActivationController( 421 new internal::ActivationController(
421 focus_client_.get(), 422 focus_client_.get(),
422 new internal::AshActivationController)); 423 new internal::AshActivationController));
423 activation_client_ = activation_controller_.get(); 424 activation_client_ = activation_controller_.get();
424 AddPreTargetHandler(activation_controller_.get()); 425 AddPreTargetHandler(activation_controller_.get());
425 } 426 }
426 427
427 focus_cycler_.reset(new internal::FocusCycler()); 428 focus_cycler_.reset(new internal::FocusCycler());
428 429
429 screen_position_controller_.reset(new internal::ScreenPositionController); 430 screen_position_controller_.reset(new internal::ScreenPositionController);
431 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
430 display_controller_.reset(new DisplayController); 432 display_controller_.reset(new DisplayController);
431 display_controller_->InitPrimaryDisplay(); 433 display_controller_->InitPrimaryDisplay();
432 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow(); 434 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
433 active_root_window_ = root_window; 435 active_root_window_ = root_window;
434 436
435 cursor_manager_.SetDeviceScaleFactor( 437 cursor_manager_.SetDeviceScaleFactor(
436 root_window->AsRootWindowHostDelegate()->GetDeviceScaleFactor()); 438 root_window->AsRootWindowHostDelegate()->GetDeviceScaleFactor());
437 439
438 #if !defined(OS_MACOSX) 440 #if !defined(OS_MACOSX)
439 nested_dispatcher_controller_.reset(new NestedDispatcherController); 441 nested_dispatcher_controller_.reset(new NestedDispatcherController);
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 897
896 //////////////////////////////////////////////////////////////////////////////// 898 ////////////////////////////////////////////////////////////////////////////////
897 // Shell, aura::client::ActivationChangeObserver implementation: 899 // Shell, aura::client::ActivationChangeObserver implementation:
898 900
899 void Shell::OnWindowActivated(aura::Window* gained_active, 901 void Shell::OnWindowActivated(aura::Window* gained_active,
900 aura::Window* lost_active) { 902 aura::Window* lost_active) {
901 active_root_window_ = gained_active->GetRootWindow(); 903 active_root_window_ = gained_active->GetRootWindow();
902 } 904 }
903 905
904 } // namespace ash 906 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698