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

Unified Diff: ui/aura/remote_window_tree_host_win.cc

Issue 201573015: Introdcue AshWindowTreeHost and move ash/chrome specific code in WTH to ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 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: ui/aura/remote_window_tree_host_win.cc
diff --git a/ui/aura/remote_window_tree_host_win.cc b/ui/aura/remote_window_tree_host_win.cc
index 19715ba4f3ff8e9aab10a125270a42b7a9d1405d..6525588cfee9dab063f276aba79b894ff4d98de5 100644
--- a/ui/aura/remote_window_tree_host_win.cc
+++ b/ui/aura/remote_window_tree_host_win.cc
@@ -149,16 +149,17 @@ void HandleMetroExit() {
RemoteWindowTreeHostWin* g_instance = NULL;
+// static
RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Instance() {
- if (g_instance)
- return g_instance;
- return Create(gfx::Rect());
+ if (!g_instance)
+ g_instance = new RemoteWindowTreeHostWin(gfx::Rect());
+ return g_instance;
}
-RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Create(
- const gfx::Rect& bounds) {
- g_instance = g_instance ? g_instance : new RemoteWindowTreeHostWin(bounds);
- return g_instance;
+// static
+void RemoteWindowTreeHostWin::SetInstance(RemoteWindowTreeHostWin* instance) {
+ CHECK(!g_instance);
+ g_instance = instance;
}
RemoteWindowTreeHostWin::RemoteWindowTreeHostWin(const gfx::Rect& bounds)
@@ -390,9 +391,6 @@ void RemoteWindowTreeHostWin::Hide() {
NOTIMPLEMENTED();
}
-void RemoteWindowTreeHostWin::ToggleFullScreen() {
-}
-
gfx::Rect RemoteWindowTreeHostWin::GetBounds() const {
return gfx::Rect(window_size_);
}
@@ -402,13 +400,6 @@ void RemoteWindowTreeHostWin::SetBounds(const gfx::Rect& bounds) {
OnHostResized(bounds.size());
}
-gfx::Insets RemoteWindowTreeHostWin::GetInsets() const {
- return gfx::Insets();
-}
-
-void RemoteWindowTreeHostWin::SetInsets(const gfx::Insets& insets) {
-}
-
gfx::Point RemoteWindowTreeHostWin::GetLocationOnNativeScreen() const {
return gfx::Point(0, 0);
}
@@ -433,13 +424,6 @@ bool RemoteWindowTreeHostWin::QueryMouseLocation(gfx::Point* location_return) {
return true;
}
-bool RemoteWindowTreeHostWin::ConfineCursorToRootWindow() {
- return true;
-}
-
-void RemoteWindowTreeHostWin::UnConfineCursor() {
-}
-
void RemoteWindowTreeHostWin::SetCursorNative(gfx::NativeCursor native_cursor) {
if (!host_)
return;

Powered by Google App Engine
This is Rietveld 408576698