OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/platform_window/win/win_window_factory.h" |
| 6 |
| 7 #include "ui/platform_window/win/win_window.h" |
| 8 |
| 9 namespace ui { |
| 10 |
| 11 WinWindowFactory::WinWindowFactory() { |
| 12 } |
| 13 |
| 14 WinWindowFactory::~WinWindowFactory() { |
| 15 } |
| 16 |
| 17 // static |
| 18 PlatformWindowFactory* WinWindowFactory::CreateIfNecessary() { |
| 19 PlatformWindowFactory* instance = GetInstance(); |
| 20 if (!instance) |
| 21 new WinWindowFactory(); |
| 22 instance = GetInstance(); |
| 23 CHECK(instance); |
| 24 return instance; |
| 25 } |
| 26 |
| 27 scoped_ptr<PlatformWindow> WinWindowFactory::CreatePlatformWindow( |
| 28 PlatformWindowDelegate* delegate, |
| 29 const gfx::Rect& bounds) { |
| 30 return scoped_ptr<PlatformWindow>(new WinWindow(delegate, bounds)); |
| 31 } |
| 32 |
| 33 } // namespace ui |
OLD | NEW |