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

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

Issue 1043233003: ozone: Add post message loop initialization hook (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return without failing Created 5 years, 8 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
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/public/ozone_platform.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/ozone/ozone_export.h" 9 #include "ui/ozone/ozone_export.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 OzonePlatform(); 43 OzonePlatform();
44 virtual ~OzonePlatform(); 44 virtual ~OzonePlatform();
45 45
46 // Initializes the subsystems/resources necessary for the UI process (e.g. 46 // Initializes the subsystems/resources necessary for the UI process (e.g.
47 // events, surface, etc.) 47 // events, surface, etc.)
48 static void InitializeForUI(); 48 static void InitializeForUI();
49 49
50 // Initializes the subsystems/resources necessary for the GPU process. 50 // Initializes the subsystems/resources necessary for the GPU process.
51 static void InitializeForGPU(); 51 static void InitializeForGPU();
52 52
53 // Initializes the subsystems/resources necessary for the GPU process, after
54 // the message loop is started. This is used mainly for initialization tasks
55 // that need to take a reference to the UI thread MessageLoopProxy.
56 // InitializeForGPU() necessarily needs to be called first.
57 static void InitializeForGpuPostMainLoop();
58
53 static OzonePlatform* GetInstance(); 59 static OzonePlatform* GetInstance();
54 60
55 // Factory getters to override in subclasses. The returned objects will be 61 // Factory getters to override in subclasses. The returned objects will be
56 // injected into the appropriate layer at startup. Subclasses should not 62 // injected into the appropriate layer at startup. Subclasses should not
57 // inject these objects themselves. Ownership is retained by OzonePlatform. 63 // inject these objects themselves. Ownership is retained by OzonePlatform.
58 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0; 64 virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() = 0;
59 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0; 65 virtual ui::CursorFactoryOzone* GetCursorFactoryOzone() = 0;
60 virtual ui::InputController* GetInputController() = 0; 66 virtual ui::InputController* GetInputController() = 0;
61 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0; 67 virtual ui::GpuPlatformSupport* GetGpuPlatformSupport() = 0;
62 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0; 68 virtual ui::GpuPlatformSupportHost* GetGpuPlatformSupportHost() = 0;
63 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0; 69 virtual scoped_ptr<SystemInputInjector> CreateSystemInputInjector() = 0;
64 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( 70 virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
65 PlatformWindowDelegate* delegate, 71 PlatformWindowDelegate* delegate,
66 const gfx::Rect& bounds) = 0; 72 const gfx::Rect& bounds) = 0;
67 virtual scoped_ptr<ui::NativeDisplayDelegate> 73 virtual scoped_ptr<ui::NativeDisplayDelegate>
68 CreateNativeDisplayDelegate() = 0; 74 CreateNativeDisplayDelegate() = 0;
69 75
70 private: 76 private:
71 virtual void InitializeUI() = 0; 77 virtual void InitializeUI() = 0;
72 virtual void InitializeGPU() = 0; 78 virtual void InitializeGPU() = 0;
79 virtual void InitializeGpuPostMainLoop() = 0;
73 80
74 static void CreateInstance(); 81 static void CreateInstance();
75 82
76 static OzonePlatform* instance_; 83 static OzonePlatform* instance_;
77 84
78 DISALLOW_COPY_AND_ASSIGN(OzonePlatform); 85 DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
79 }; 86 };
80 87
81 } // namespace ui 88 } // namespace ui
82 89
83 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_ 90 #endif // UI_OZONE_PUBLIC_OZONE_PLATFORM_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/ozone_platform_test.cc ('k') | ui/ozone/public/ozone_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698