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

Unified Diff: components/view_manager/surfaces/surfaces_service_application.cc

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bot issues (I hope) Created 5 years, 4 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
Index: components/view_manager/surfaces/surfaces_service_application.cc
diff --git a/components/view_manager/surfaces/surfaces_service_application.cc b/components/view_manager/surfaces/surfaces_service_application.cc
deleted file mode 100644
index 2f6be1af7979466650fa17b20b5add2d2c01cc7d..0000000000000000000000000000000000000000
--- a/components/view_manager/surfaces/surfaces_service_application.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2014 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 "components/view_manager/surfaces/surfaces_service_application.h"
-
-#include "base/stl_util.h"
-#include "components/view_manager/surfaces/display_factory_impl.h"
-#include "components/view_manager/surfaces/surfaces_impl.h"
-#include "components/view_manager/surfaces/surfaces_state.h"
-
-namespace surfaces {
-
-SurfacesServiceApplication::SurfacesServiceApplication() {
-}
-
-SurfacesServiceApplication::~SurfacesServiceApplication() {
- // Make a copy of the sets before deleting them because their destructor will
- // call back into this class to remove them from the set.
- auto displays = displays_;
- for (auto& display : displays)
- display->CloseConnection();
-
- auto surfaces = surfaces_;
- for (auto& surface : surfaces)
- surface->CloseConnection();
-}
-
-void SurfacesServiceApplication::Initialize(mojo::ApplicationImpl* app) {
- tracing_.Initialize(app);
- surfaces_state_ = new SurfacesState;
-}
-
-bool SurfacesServiceApplication::ConfigureIncomingConnection(
- mojo::ApplicationConnection* connection) {
- connection->AddService<mojo::DisplayFactory>(this);
- connection->AddService<mojo::Surface>(this);
- return true;
-}
-
-void SurfacesServiceApplication::Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::DisplayFactory> request) {
- new DisplayFactoryImpl(this, surfaces_state_, request.Pass());
-}
-
-void SurfacesServiceApplication::Create(
- mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::Surface> request) {
- // SurfacesImpl manages its own lifetime.
- surfaces_.insert(new SurfacesImpl(this, surfaces_state_, request.Pass()));
-}
-
-void SurfacesServiceApplication::OnDisplayCreated(DisplayImpl* display) {
- displays_.insert(display);
-}
-
-void SurfacesServiceApplication::OnDisplayConnectionClosed(
- DisplayImpl* display) {
- displays_.erase(display);
-}
-
-void SurfacesServiceApplication::OnSurfaceConnectionClosed(
- SurfacesImpl* surface) {
- surfaces_.erase(surface);
-}
-
-} // namespace surfaces

Powered by Google App Engine
This is Rietveld 408576698