Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / services / view_manager / view_manager_init_service_impl.h
blob49cc628c48a4be44158ca170ef52a104f89068e7
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
13 #include "mojo/services/view_manager/connection_manager.h"
14 #include "mojo/services/view_manager/view_manager_export.h"
16 namespace mojo {
18 class ApplicationConnection;
20 namespace service {
22 class ViewManagerInitServiceContext;
24 #if defined(OS_WIN)
25 // Equivalent of NON_EXPORTED_BASE which does not work with the template snafu
26 // below.
27 #pragma warning(push)
28 #pragma warning(disable : 4275)
29 #endif
31 // Used to create the initial ViewManagerClient. Doesn't initiate the Connect()
32 // until the WindowTreeHost has been created.
33 class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceImpl
34 : public InterfaceImpl<ViewManagerInitService> {
35 public:
36 ViewManagerInitServiceImpl(ApplicationConnection* connection,
37 ViewManagerInitServiceContext* context);
38 virtual ~ViewManagerInitServiceImpl();
40 private:
41 // ViewManagerInitService overrides:
42 virtual void Embed(const String& url,
43 ServiceProviderPtr service_provider,
44 const Callback<void(bool)>& callback) OVERRIDE;
46 ViewManagerInitServiceContext* context_;
48 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceImpl);
51 #if defined(OS_WIN)
52 #pragma warning(pop)
53 #endif
55 } // namespace service
56 } // namespace mojo
58 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_