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

Unified Diff: device/vr/android/gvr/gvr_api_manager.cc

Issue 2309523003: Plumbing through more WebVR presentation code (Closed)
Patch Set: Addressed Michael's feedack Created 4 years, 3 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 | « device/vr/android/gvr/gvr_api_manager.h ('k') | device/vr/android/gvr/gvr_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_api_manager.cc
diff --git a/device/vr/android/gvr/gvr_api_manager.cc b/device/vr/android/gvr/gvr_api_manager.cc
deleted file mode 100644
index 75d20e039fc77ce18c0d428e80fc560df196036e..0000000000000000000000000000000000000000
--- a/device/vr/android/gvr/gvr_api_manager.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "device/vr/android/gvr/gvr_api_manager.h"
-
-namespace device {
-
-namespace {
-GvrApiManager* g_gvr_api_manager = nullptr;
-}
-
-GvrApiManager* GvrApiManager::GetInstance() {
- if (!g_gvr_api_manager)
- g_gvr_api_manager = new GvrApiManager();
- return g_gvr_api_manager;
-}
-
-GvrApiManager::GvrApiManager() {}
-
-GvrApiManager::~GvrApiManager() {}
-
-void GvrApiManager::AddClient(GvrApiManagerClient* client) {
- clients_.push_back(client);
-
- if (gvr_api_)
- client->OnGvrApiInitialized(gvr_api_.get());
-}
-
-void GvrApiManager::RemoveClient(GvrApiManagerClient* client) {
- clients_.erase(std::remove(clients_.begin(), clients_.end(), client),
- clients_.end());
-}
-
-void GvrApiManager::Initialize(gvr_context* context) {
- gvr_api_ = gvr::GvrApi::WrapNonOwned(context);
-
- for (const auto& client : clients_)
- client->OnGvrApiInitialized(gvr_api_.get());
-}
-
-void GvrApiManager::Shutdown() {
- if (!gvr_api_)
- return;
-
- gvr_api_.reset(nullptr);
-
- for (const auto& client : clients_)
- client->OnGvrApiShutdown();
-}
-
-gvr::GvrApi* GvrApiManager::gvr_api() {
- return gvr_api_.get();
-}
-
-} // namespace device
« no previous file with comments | « device/vr/android/gvr/gvr_api_manager.h ('k') | device/vr/android/gvr/gvr_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698