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

Unified Diff: ui/ozone/platform/dri/ozone_platform_gbm.cc

Issue 325873002: [Ozone DRI] Add support to configure the VT on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/dri/virtual_terminal_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/ozone_platform_gbm.cc
diff --git a/ui/ozone/platform/dri/ozone_platform_gbm.cc b/ui/ozone/platform/dri/ozone_platform_gbm.cc
index 56c1744c19cbb27190ae8134f957cf5d2475ee83..4e47a289f841630bbcf75ee1ad386f43242a6368 100644
--- a/ui/ozone/platform/dri/ozone_platform_gbm.cc
+++ b/ui/ozone/platform/dri/ozone_platform_gbm.cc
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <gbm.h>
+#include "base/at_exit.h"
#include "ui/base/cursor/ozone/cursor_factory_ozone.h"
#include "ui/events/ozone/device/device_manager.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
@@ -17,6 +18,7 @@
#include "ui/ozone/platform/dri/gbm_surface_factory.h"
#include "ui/ozone/platform/dri/scanout_surface.h"
#include "ui/ozone/platform/dri/screen_manager.h"
+#include "ui/ozone/platform/dri/virtual_terminal_manager.h"
#if defined(OS_CHROMEOS)
#include "ui/ozone/common/chromeos/native_display_delegate_ozone.h"
@@ -60,7 +62,10 @@ class GbmSurfaceGenerator : public ScanoutSurfaceGenerator {
class OzonePlatformGbm : public OzonePlatform {
public:
- OzonePlatformGbm() {}
+ OzonePlatformGbm() {
+ base::AtExitManager::RegisterTask(
+ base::Bind(&base::DeletePointer<OzonePlatformGbm>, this));
+ }
virtual ~OzonePlatformGbm() {}
// OzonePlatform:
@@ -85,6 +90,7 @@ class OzonePlatformGbm : public OzonePlatform {
}
#endif
virtual void InitializeUI() OVERRIDE {
+ vt_manager_.reset(new VirtualTerminalManager());
// Needed since the browser process creates the accelerated widgets and that
// happens through SFO.
surface_factory_ozone_.reset(new GbmSurfaceFactory(NULL, NULL, NULL));
@@ -107,9 +113,9 @@ class OzonePlatformGbm : public OzonePlatform {
}
private:
+ scoped_ptr<VirtualTerminalManager> vt_manager_;
scoped_ptr<DriWrapper> dri_;
scoped_ptr<GbmSurfaceGenerator> surface_generator_;
- // TODO(dnicoara) Move ownership of |screen_manager_| to NDD.
scoped_ptr<ScreenManager> screen_manager_;
scoped_ptr<DeviceManager> device_manager_;
« no previous file with comments | « ui/ozone/platform/dri/ozone_platform_dri.cc ('k') | ui/ozone/platform/dri/virtual_terminal_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698