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

Unified Diff: ash/display/mirror_window_controller.h

Issue 1107733006: Unified Desktop: hook up ash to allow unified desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: ash/display/mirror_window_controller.h
diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h
index 5b24cc6a1b64c968d210effe175b9a57afe7ec25..9301d4d0a651a3b4766858231c65a5e48dce90ec 100644
--- a/ash/display/mirror_window_controller.h
+++ b/ash/display/mirror_window_controller.h
@@ -5,6 +5,9 @@
#ifndef ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
#define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
+#include <map>
+#include <vector>
+
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
@@ -40,7 +43,7 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver {
// Updates the root window's bounds using |display_info|.
// Creates the new root window if one doesn't exist.
- void UpdateWindow(const DisplayInfo& display_info);
+ void UpdateWindow(const std::vector<DisplayInfo>& display_info);
// Same as above, but using existing display info
// for the mirrored display.
@@ -59,12 +62,23 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver {
private:
friend class test::MirrorWindowTestApi;
+ struct MirroringHostInfo {
+ MirroringHostInfo();
+ ~MirroringHostInfo();
+ scoped_ptr<AshWindowTreeHost> ash_host;
+ gfx::Size mirror_window_host_size;
+ aura::Window* mirror_window = nullptr;
+ };
+
+ void CloseHost(MirroringHostInfo* host_info);
+
// Creates a RootWindowTransformer for current display
// configuration.
scoped_ptr<RootWindowTransformer> CreateRootWindowTransformer() const;
- scoped_ptr<AshWindowTreeHost> ash_host_;
- gfx::Size mirror_window_host_size_;
+ typedef std::map<int64_t, MirroringHostInfo*> MirroringHostInfoMap;
+ MirroringHostInfoMap mirroring_host_info_map_;
+
scoped_ptr<ui::Reflector> reflector_;
DISALLOW_COPY_AND_ASSIGN(MirrorWindowController);

Powered by Google App Engine
This is Rietveld 408576698