Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: ui/ozone/public/ozone_platform.h

Issue 2769123002: Remove InitializeForUI() from OzonePlatform (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool single_process = false; 72 bool single_process = false;
73 }; 73 };
74 74
75 // Ensures the OzonePlatform instance without doing any initialization. 75 // Ensures the OzonePlatform instance without doing any initialization.
76 // No-op in case the instance is already created. 76 // No-op in case the instance is already created.
77 // This is useful in order call virtual methods that depend on the ozone 77 // This is useful in order call virtual methods that depend on the ozone
78 // platform selected at runtime, e.g. ::GetMessageLoopTypeForGpu. 78 // platform selected at runtime, e.g. ::GetMessageLoopTypeForGpu.
79 static OzonePlatform* EnsureInstance(); 79 static OzonePlatform* EnsureInstance();
80 80
81 // Initializes the subsystems/resources necessary for the UI process (e.g. 81 // Initializes the subsystems/resources necessary for the UI process (e.g.
82 // events, etc.)
83 // TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934)
84 static void InitializeForUI();
85
86 // Initializes the subsystems/resources necessary for the UI process (e.g.
87 // events) with additional properties to customize the ozone platform 82 // events) with additional properties to customize the ozone platform
88 // implementation. Ozone will not retain InitParams after returning from 83 // implementation. Ozone will not retain InitParams after returning from
89 // InitalizeForUI. 84 // InitalizeForUI.
90 static void InitializeForUI(const InitParams& args); 85 static void InitializeForUI(const InitParams& args);
91 86
92 // Initializes the subsystems for rendering but with additional properties 87 // Initializes the subsystems for rendering but with additional properties
93 // provided by |args| as with InitalizeForUI. 88 // provided by |args| as with InitalizeForUI.
94 static void InitializeForGPU(const InitParams& args); 89 static void InitializeForGPU(const InitParams& args);
95 90
96 static OzonePlatform* GetInstance(); 91 static OzonePlatform* GetInstance();
(...skipping 22 matching lines...) Expand all
119 // internal functionality. Embedders wishing to take advantage of ozone mojo 114 // internal functionality. Embedders wishing to take advantage of ozone mojo
120 // implementations must invoke AddInterfaces with a valid 115 // implementations must invoke AddInterfaces with a valid
121 // service_manager::InterfaceRegistry* pointer to export all Mojo interfaces 116 // service_manager::InterfaceRegistry* pointer to export all Mojo interfaces
122 // defined within Ozone. 117 // defined within Ozone.
123 // 118 //
124 // A default do-nothing implementation is provided to permit platform 119 // A default do-nothing implementation is provided to permit platform
125 // implementations to opt out of implementing any Mojo interfaces. 120 // implementations to opt out of implementing any Mojo interfaces.
126 virtual void AddInterfaces(service_manager::InterfaceRegistry* registry); 121 virtual void AddInterfaces(service_manager::InterfaceRegistry* registry);
127 122
128 private: 123 private:
129 virtual void InitializeUI() = 0; 124 virtual void InitializeUI(const InitParams& args) = 0;
130 virtual void InitializeGPU() = 0; 125 virtual void InitializeGPU(const InitParams& args) = 0;
131 virtual void InitializeUI(const InitParams& args);
132 virtual void InitializeGPU(const InitParams& args);
133 126
134 static OzonePlatform* instance_; 127 static OzonePlatform* instance_;
135 128
136 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); 129 DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
137 }; 130 };
138 131
139 } // namespace ui 132 } // namespace ui
140 133
141 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ 134 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698