1424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
2424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)// found in the LICENSE file.
4424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
5424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
6424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
7424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
8424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)#include "ui/views/views_export.h"
9424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
10424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)namespace gfx {
11424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)class Rect;
12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)class Screen;
13424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)}
14424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
15424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)namespace views {
16424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)class DesktopNativeWidgetAura;
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class DesktopWindowTreeHost;
18424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
19424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)namespace internal {
20424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)class NativeWidgetDelegate;
21424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)}
22424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
23424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)class VIEWS_EXPORT DesktopFactoryOzone {
24424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) public:
25424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  DesktopFactoryOzone();
26424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  virtual ~DesktopFactoryOzone();
27424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
28424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  // Returns the instance.
29424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  static DesktopFactoryOzone* GetInstance();
30424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
31424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  // Sets the implementation delegate. Ownership is retained by the caller.
32424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  static void SetInstance(DesktopFactoryOzone* impl);
33424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // Delegates implementation of DesktopWindowTreeHost::Create externally to
35424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  // Ozone implementation.
365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  virtual DesktopWindowTreeHost* CreateWindowTreeHost(
37424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)      internal::NativeWidgetDelegate* native_widget_delegate,
381e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)      DesktopNativeWidgetAura* desktop_native_widget_aura) = 0;
39424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
40a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  // Delegates implementation of DesktopScreen externally to
41a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  // Ozone implementation.
42a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)  virtual gfx::Screen* CreateDesktopScreen() = 0;
43a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
44424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles) private:
45424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  static DesktopFactoryOzone* impl_; // not owned
46424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)};
47424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
48424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)}  // namespace views
49424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)
50424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
51