Home | History | Annotate | Download | only in desktop_aura
      1 // Copyright 2013 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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
      6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
      7 
      8 #include "ui/views/views_export.h"
      9 
     10 namespace gfx {
     11 class Rect;
     12 class Screen;
     13 }
     14 
     15 namespace views {
     16 class DesktopNativeWidgetAura;
     17 class DesktopWindowTreeHost;
     18 
     19 namespace internal {
     20 class NativeWidgetDelegate;
     21 }
     22 
     23 class VIEWS_EXPORT DesktopFactoryOzone {
     24  public:
     25   DesktopFactoryOzone();
     26   virtual ~DesktopFactoryOzone();
     27 
     28   // Returns the instance.
     29   static DesktopFactoryOzone* GetInstance();
     30 
     31   // Sets the implementation delegate. Ownership is retained by the caller.
     32   static void SetInstance(DesktopFactoryOzone* impl);
     33 
     34   // Delegates implementation of DesktopWindowTreeHost::Create externally to
     35   // Ozone implementation.
     36   virtual DesktopWindowTreeHost* CreateWindowTreeHost(
     37       internal::NativeWidgetDelegate* native_widget_delegate,
     38       DesktopNativeWidgetAura* desktop_native_widget_aura) = 0;
     39 
     40   // Delegates implementation of DesktopScreen externally to
     41   // Ozone implementation.
     42   virtual gfx::Screen* CreateDesktopScreen() = 0;
     43 
     44  private:
     45   static DesktopFactoryOzone* impl_; // not owned
     46 };
     47 
     48 }  // namespace views
     49 
     50 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_FACTORY_OZONE_H_
     51