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

Unified Diff: ash/shell.cc

Issue 15367003: Create a mirror window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/test/mirror_window_test_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 1bf73496a0ec342db250741289d3e813f74c5633..7b87e44aa725919f8b4453045474a53db02ac01d 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -16,6 +16,7 @@
#include "ash/display/display_controller.h"
#include "ash/display/display_manager.h"
#include "ash/display/event_transformation_handler.h"
+#include "ash/display/mirror_window_controller.h"
#include "ash/display/mouse_cursor_event_filter.h"
#include "ash/display/screen_position_controller.h"
#include "ash/drag_drop/drag_drop_controller.h"
@@ -211,6 +212,8 @@ Shell::Shell(ShellDelegate* delegate)
simulate_modal_window_open_for_testing_(false) {
DCHECK(delegate_.get());
display_manager_.reset(new internal::DisplayManager);
+ mirror_window_controller_.reset(new internal::MirrorWindowController);
+
ANNOTATE_LEAKING_OBJECT_PTR(screen_); // see crbug.com/156466
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE))
@@ -298,6 +301,8 @@ Shell::~Shell() {
power_button_controller_.reset();
session_state_controller_.reset();
+ mirror_window_controller_.reset();
+
// This also deletes all RootWindows. Note that we invoke Shutdown() on
// DisplayController before resetting |display_controller_|, since destruction
// of its owned RootWindowControllers relies on the value.
@@ -469,6 +474,7 @@ void Shell::Init() {
screen_position_controller_.reset(new internal::ScreenPositionController);
root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
+
display_controller_->Start();
display_controller_->InitPrimaryDisplay();
aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
« no previous file with comments | « ash/shell.h ('k') | ash/test/mirror_window_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698