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

Unified Diff: ash/host/ash_remote_window_tree_host_win.cc

Issue 277753002: Makes construction of (ash)RemoteWindowTreeHostWin explicit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/host/ash_remote_window_tree_host_win.cc
diff --git a/ash/host/ash_remote_window_tree_host_win.cc b/ash/host/ash_remote_window_tree_host_win.cc
index ff8c8df5b5c82881421aae62a1798d8b2cea2603..67d3aaa8862f12c77251d2b37ce7775379a7c9a0 100644
--- a/ash/host/ash_remote_window_tree_host_win.cc
+++ b/ash/host/ash_remote_window_tree_host_win.cc
@@ -9,32 +9,14 @@
#include "ui/gfx/transform.h"
namespace ash {
-namespace {
-AshRemoteWindowTreeHostWin* g_instance = NULL;
-}
-
-// static
-void AshRemoteWindowTreeHostWin::Init() {
- DCHECK(!g_instance);
- g_instance = new AshRemoteWindowTreeHostWin();
- aura::RemoteWindowTreeHostWin::SetInstance(g_instance);
- CHECK_EQ(g_instance, aura::RemoteWindowTreeHostWin::Instance());
-}
-
-// static
-AshRemoteWindowTreeHostWin* AshRemoteWindowTreeHostWin::GetInstance() {
- if (!g_instance)
- Init();
- CHECK_EQ(g_instance, aura::RemoteWindowTreeHostWin::Instance());
- return g_instance;
-}
-AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin()
- : aura::RemoteWindowTreeHostWin(gfx::Rect()), transformer_helper_(this) {
- g_instance = this;
+AshRemoteWindowTreeHostWin::AshRemoteWindowTreeHostWin(HWND remote_hwnd)
+ : aura::RemoteWindowTreeHostWin(),
+ transformer_helper_(this) {
+ SetRemoteWindowHandle(remote_hwnd);
}
-AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() { g_instance = NULL; }
+AshRemoteWindowTreeHostWin::~AshRemoteWindowTreeHostWin() {}
void AshRemoteWindowTreeHostWin::ToggleFullScreen() {}
« no previous file with comments | « ash/host/ash_remote_window_tree_host_win.h ('k') | ash/host/ash_window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698