| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 5 #ifndef UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
| 6 #define UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 6 #define UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // events, etc.) | 82 // events, etc.) |
| 83 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934) | 83 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934) |
| 84 static void InitializeForUI(); | 84 static void InitializeForUI(); |
| 85 | 85 |
| 86 // Initializes the subsystems/resources necessary for the UI process (e.g. | 86 // Initializes the subsystems/resources necessary for the UI process (e.g. |
| 87 // events) with additional properties to customize the ozone platform | 87 // events) with additional properties to customize the ozone platform |
| 88 // implementation. Ozone will not retain InitParams after returning from | 88 // implementation. Ozone will not retain InitParams after returning from |
| 89 // InitalizeForUI. | 89 // InitalizeForUI. |
| 90 static void InitializeForUI(const InitParams& args); | 90 static void InitializeForUI(const InitParams& args); |
| 91 | 91 |
| 92 // Initializes the subsystems/resources necessary for rendering (i.e. GPU). | |
| 93 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934) | |
| 94 static void InitializeForGPU(); | |
| 95 | |
| 96 // Initializes the subsystems for rendering but with additional properties | 92 // Initializes the subsystems for rendering but with additional properties |
| 97 // provided by |args| as with InitalizeForUI. | 93 // provided by |args| as with InitalizeForUI. |
| 98 static void InitializeForGPU(const InitParams& args); | 94 static void InitializeForGPU(const InitParams& args); |
| 99 | 95 |
| 100 static OzonePlatform* GetInstance(); | 96 static OzonePlatform* GetInstance(); |
| 101 | 97 |
| 102 // Factory getters to override in subclasses. The returned objects will be | 98 // Factory getters to override in subclasses. The returned objects will be |
| 103 // injected into the appropriate layer at startup. Subclasses should not | 99 // injected into the appropriate layer at startup. Subclasses should not |
| 104 // inject these objects themselves. Ownership is retained by OzonePlatform. | 100 // inject these objects themselves. Ownership is retained by OzonePlatform. |
| 105 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; | 101 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 136 virtual void InitializeGPU(const InitParams& args); | 132 virtual void InitializeGPU(const InitParams& args); |
| 137 | 133 |
| 138 static OzonePlatform* instance_; | 134 static OzonePlatform* instance_; |
| 139 | 135 |
| 140 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); | 136 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); |
| 141 }; | 137 }; |
| 142 | 138 |
| 143 } // namespace ui | 139 } // namespace ui |
| 144 | 140 |
| 145 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ | 141 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ |
| OLD | NEW |