From 64c8f4f25d9fbd2233e476d6276b4c63bcc4813c Mon Sep 17 00:00:00 2001 From: reillyg Date: Wed, 10 Feb 2016 15:29:20 -0800 Subject: Remove //device/devices_app. This change removes the code to create a Mojo app containing device services (currently only USB) and instead makes the Mojo bindings for //device/usb part of that directory. The Mojo service implementation is still in a separate //device/usb/mojo target but this will eventually merge into its parent directory as the Mojo interface becomes the only public interface for //device/usb. BUG=None Review URL: https://codereview.chromium.org/1682363002 Cr-Commit-Position: refs/heads/master@{#374778} --- device/devices_app/devices_app.h | 67 ---------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 device/devices_app/devices_app.h (limited to 'device/devices_app/devices_app.h') diff --git a/device/devices_app/devices_app.h b/device/devices_app/devices_app.h deleted file mode 100644 index 0fecb42..0000000 --- a/device/devices_app/devices_app.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2015 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. - -#ifndef DEVICE_DEVICES_DEVICES_APP_H_ -#define DEVICE_DEVICES_DEVICES_APP_H_ - -#include - -#include "base/cancelable_callback.h" -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" -#include "mojo/shell/public/cpp/interface_factory.h" -#include "mojo/shell/public/cpp/shell_client.h" - -namespace mojo { -class Shell; -} - -namespace device { - -namespace usb { -class DeviceManager; -} - -class DevicesApp : public mojo::ShellClient, - public mojo::InterfaceFactory { - public: - DevicesApp(); - ~DevicesApp() override; - - private: - class USBServiceInitializer; - - // mojo::ShellClient: - void Initialize(mojo::Shell* shell, - const std::string& url, - uint32_t id) override; - bool AcceptConnection(mojo::Connection* connection) override; - void Quit() override; - - // mojo::InterfaceFactory: - void Create(mojo::Connection* connection, - mojo::InterfaceRequest request) override; - - // Mojo error handler to track device manager count. - void OnConnectionError(); - - // Sets the app for destruction after a period of idle time. If any top-level - // services (e.g. usb::DeviceManager) are bound before the timeout elapses, - // it's canceled. - void StartIdleTimer(); - - mojo::Shell* shell_; - scoped_ptr service_initializer_; - size_t active_device_manager_count_; - - // Callback used to shut down the app after a period of inactivity. - base::CancelableClosure idle_timeout_callback_; - - DISALLOW_COPY_AND_ASSIGN(DevicesApp); -}; - -} // naespace device - -#endif // DEVICE_DEVICES_DEVICES_APP_H_ -- cgit v1.1