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

Unified Diff: ash/display/mirror_window_controller.h

Issue 1133323002: Close mirroring window only when necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/display/display_manager.cc ('k') | ash/display/mirror_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mirror_window_controller.h
diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h
index 8bef88a923aad68c5065ccdb831397b5d7845f3b..9f38102bc4aaa0edb478f48bd77a462f72fbc96b 100644
--- a/ash/display/mirror_window_controller.h
+++ b/ash/display/mirror_window_controller.h
@@ -9,6 +9,7 @@
#include <vector>
#include "ash/ash_export.h"
+#include "ash/display/display_manager.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -57,8 +58,8 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver {
// for the mirrored display.
void UpdateWindow();
- // Close the mirror window.
- void Close();
+ // Close the mirror window if they're not necessary any longer.
+ void CloseIfNotNecessary();
// aura::WindowTreeHostObserver overrides:
void OnHostResized(const aura::WindowTreeHost* host) override;
@@ -81,7 +82,13 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver {
struct MirroringHostInfo;
- void CloseAndDeleteHost(MirroringHostInfo* host_info);
+ // Close the mirror window. When |delay_host_deletion| is true, the window
+ // tree host will be deleted in an another task on UI thread. This is
+ // necessary to safely delete the WTH that is currently handling input events.
+ void Close(bool delay_host_deletion);
+
+ void CloseAndDeleteHost(MirroringHostInfo* host_info,
+ bool delay_host_deletion);
// Creates a RootWindowTransformer for current display
// configuration.
@@ -90,6 +97,8 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver {
typedef std::map<int64_t, MirroringHostInfo*> MirroringHostInfoMap;
MirroringHostInfoMap mirroring_host_info_map_;
+ DisplayManager::MultiDisplayMode multi_display_mode_;
+
scoped_ptr<aura::client::ScreenPositionClient> screen_position_client_;
scoped_ptr<ui::Reflector> reflector_;
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/mirror_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698