summaryrefslogtreecommitdiffstats
path: root/ui/ozone/platform/cast/ozone_platform_cast.cc
diff options
context:
space:
mode:
authordnicoara <dnicoara@chromium.org>2015-05-22 12:23:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-22 19:24:54 +0000
commita0debf17a1a66b300ca67f588148274c6c790e42 (patch)
tree17a2cf79cda7730ed2e93fa8abeedb3f101bcf01 /ui/ozone/platform/cast/ozone_platform_cast.cc
parentf654a8898992de10765c036f8517f1027cbcbdba (diff)
downloadchromium_src-a0debf17a1a66b300ca67f588148274c6c790e42.zip
chromium_src-a0debf17a1a66b300ca67f588148274c6c790e42.tar.gz
chromium_src-a0debf17a1a66b300ca67f588148274c6c790e42.tar.bz2
[Ozone] Split overlay management into separate object
Overlay management happens in the browser process while SurfaceFactoryOzone is mainly used in the GPU process. This made it more complex since now the SurfaceFactory would need to be instantiated in both processes (and handle the case were running in-process) but each instance would have its own distinct role. BUG=none Review URL: https://codereview.chromium.org/1129073004 Cr-Commit-Position: refs/heads/master@{#331151}
Diffstat (limited to 'ui/ozone/platform/cast/ozone_platform_cast.cc')
-rw-r--r--ui/ozone/platform/cast/ozone_platform_cast.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/ozone/platform/cast/ozone_platform_cast.cc b/ui/ozone/platform/cast/ozone_platform_cast.cc
index d3a1ea9..60f7c9a 100644
--- a/ui/ozone/platform/cast/ozone_platform_cast.cc
+++ b/ui/ozone/platform/cast/ozone_platform_cast.cc
@@ -9,6 +9,7 @@
#include "chromecast/public/cast_egl_platform_shlib.h"
#include "ui/ozone/common/native_display_delegate_ozone.h"
#include "ui/ozone/platform/cast/gpu_platform_support_cast.h"
+#include "ui/ozone/platform/cast/overlay_manager_cast.h"
#include "ui/ozone/platform/cast/platform_window_cast.h"
#include "ui/ozone/platform/cast/surface_factory_cast.h"
#include "ui/ozone/public/cursor_factory_ozone.h"
@@ -39,6 +40,9 @@ class OzonePlatformCast : public OzonePlatform {
SurfaceFactoryOzone* GetSurfaceFactoryOzone() override {
return surface_factory_.get();
}
+ OverlayManagerOzone* GetOverlayManager() override {
+ return overlay_manager_.get();
+ }
CursorFactoryOzone* GetCursorFactoryOzone() override {
return cursor_factory_.get();
}
@@ -65,17 +69,13 @@ class OzonePlatformCast : public OzonePlatform {
}
void InitializeUI() override {
- if (!surface_factory_) {
- surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass()));
- }
+ overlay_manager_.reset(new OverlayManagerCast());
cursor_factory_.reset(new CursorFactoryOzone());
input_controller_ = CreateStubInputController();
gpu_platform_support_host_.reset(CreateStubGpuPlatformSupportHost());
}
void InitializeGPU() override {
- if (!surface_factory_) {
- surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass()));
- }
+ surface_factory_.reset(new SurfaceFactoryCast(egl_platform_.Pass()));
gpu_platform_support_.reset(
new GpuPlatformSupportCast(surface_factory_.get()));
}
@@ -87,6 +87,7 @@ class OzonePlatformCast : public OzonePlatform {
scoped_ptr<InputController> input_controller_;
scoped_ptr<GpuPlatformSupportCast> gpu_platform_support_;
scoped_ptr<GpuPlatformSupportHost> gpu_platform_support_host_;
+ scoped_ptr<OverlayManagerOzone> overlay_manager_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatformCast);
};