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

Unified Diff: mojo/service_manager/background_service_loader.h

Issue 437493002: mojo: allow BackgroundServiceLoader-loaded apps to Quit themselves. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « mojo/service_manager/BUILD.gn ('k') | mojo/service_manager/background_service_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/service_manager/background_service_loader.h
diff --git a/mojo/service_manager/background_service_loader.h b/mojo/service_manager/background_service_loader.h
deleted file mode 100644
index 253637adb6cfefb487ebce1db7fee5276561e98b..0000000000000000000000000000000000000000
--- a/mojo/service_manager/background_service_loader.h
+++ /dev/null
@@ -1,61 +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.
-
-#ifndef MOJO_SERVICE_MANAGER_BACKGROUND_SERVICE_LOADER_H_
-#define MOJO_SERVICE_MANAGER_BACKGROUND_SERVICE_LOADER_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
-#include "base/threading/thread.h"
-#include "mojo/service_manager/service_loader.h"
-
-namespace mojo {
-
-class ServiceManager;
-
-// ServiceLoader implementation that creates a background thread and issues load
-// requests there.
-class MOJO_SERVICE_MANAGER_EXPORT BackgroundServiceLoader
- : public ServiceLoader {
- public:
- BackgroundServiceLoader(scoped_ptr<ServiceLoader> real_loader,
- const char* thread_name,
- base::MessageLoop::Type message_loop_type);
- virtual ~BackgroundServiceLoader();
-
- // ServiceLoader overrides:
- virtual void LoadService(ServiceManager* manager,
- const GURL& url,
- ScopedMessagePipeHandle shell_handle) OVERRIDE;
- virtual void OnServiceError(ServiceManager* manager,
- const GURL& url) OVERRIDE;
-
- private:
- class BackgroundLoader;
-
- // These functions are exected on the background thread. They call through
- // to |background_loader_| to do the actual loading.
- // TODO: having this code take a |manager| is fragile (as ServiceManager isn't
- // thread safe).
- void LoadServiceOnBackgroundThread(
- ServiceManager* manager,
- const GURL& url,
- ScopedMessagePipeHandle* shell_handle);
- void OnServiceErrorOnBackgroundThread(ServiceManager* manager,
- const GURL& url);
- void ShutdownOnBackgroundThread();
-
- scoped_ptr<ServiceLoader> loader_;
- base::Thread thread_;
- base::MessageLoop::Type message_loop_type_;
-
- // Lives on |thread_|. Trivial interface that calls through to |loader_|.
- BackgroundLoader* background_loader_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundServiceLoader);
-};
-
-} // namespace mojo
-
-#endif // MOJO_SERVICE_MANAGER_BACKGROUND_SERVICE_LOADER_H_
« no previous file with comments | « mojo/service_manager/BUILD.gn ('k') | mojo/service_manager/background_service_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698