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

Unified Diff: ui/platform_window/win/win_window_factory.cc

Issue 403263002: platform-window: Add a PlatformWindowFactory for creating windows. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win32 Created 6 years, 5 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/platform_window/win/win_window_factory.cc
diff --git a/ui/platform_window/win/win_window_factory.cc b/ui/platform_window/win/win_window_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..13a3b1f46836f2dd57775bf4115190fd3085198c
--- /dev/null
+++ b/ui/platform_window/win/win_window_factory.cc
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/platform_window/win/win_window_factory.h"
+
+#include "ui/platform_window/win/win_window.h"
+
+namespace ui {
+
+WinWindowFactory::WinWindowFactory() {
+}
+
+WinWindowFactory::~WinWindowFactory() {
+}
+
+// static
+PlatformWindowFactory* WinWindowFactory::CreateIfNecessary() {
+ PlatformWindowFactory* instance = GetInstance();
+ if (!instance)
+ new WinWindowFactory();
+ instance = GetInstance();
+ CHECK(instance);
+ return instance;
+}
+
+scoped_ptr<PlatformWindow> WinWindowFactory::CreatePlatformWindow(
+ PlatformWindowDelegate* delegate,
+ const gfx::Rect& bounds) {
+ return scoped_ptr<PlatformWindow>(new WinWindow(delegate, bounds));
+}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698