Remove old about scheme URL constants.
[chromium-blink-merge.git] / ui / ozone / ozone_platform.h
bloba1b55d0e71f2c0e93decb473e9b0821d35a2caac
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.
5 #ifndef UI_OZONE_OZONE_PLATFORM_H_
6 #define UI_OZONE_OZONE_PLATFORM_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/events/ozone/event_factory_ozone.h"
10 #include "ui/gfx/ozone/surface_factory_ozone.h"
11 #include "ui/ozone/ime/input_method_context_factory_ozone.h"
12 #include "ui/ozone/ozone_export.h"
14 namespace ui {
16 // Base class for Ozone platform implementations.
18 // Ozone platforms must override this class and implement the virtual
19 // GetFooFactoryOzone() methods to provide implementations of the
20 // various ozone interfaces.
22 // The OzonePlatform subclass can own any state needed by the
23 // implementation that is shared between the various ozone interfaces,
24 // such as a connection to the windowing system.
26 // A platform is free to use different implementations of each
27 // interface depending on the context. You can, for example, create
28 // different objects depending on the underlying hardware, command
29 // line flags, or whatever is appropriate for the platform.
30 class OZONE_EXPORT OzonePlatform {
31 public:
32 OzonePlatform();
33 virtual ~OzonePlatform();
35 // Initialize the platform. Once complete, SurfaceFactoryOzone &
36 // EventFactoryOzone will be set.
37 static void Initialize();
39 // Factory getters to override in subclasses. The returned objects will be
40 // injected into the appropriate layer at startup. Subclasses should not
41 // inject these objects themselves. Ownership is retained by OzonePlatform.
42 virtual gfx::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0;
43 virtual ui::EventFactoryOzone* GetEventFactoryOzone() = 0;
44 virtual ui::InputMethodContextFactoryOzone*
45 GetInputMethodContextFactoryOzone() = 0;
47 private:
48 static OzonePlatform* instance_;
50 DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
53 } // namespace ui
55 #endif // UI_OZONE_OZONE_PLATFORM_H_