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

Side by Side Diff: mojo/services/window_manager/window_manager_impl.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_IMPL_H_
6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "base/logging.h"
10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "mojo/public/cpp/bindings/error_handler.h"
12 #include "third_party/mojo_services/src/view_manager/public/cpp/types.h"
13 #include "third_party/mojo_services/src/window_manager/public/interfaces/window_ manager.mojom.h"
14
15 namespace window_manager {
16
17 class WindowManagerApp;
18
19 class WindowManagerImpl : public mojo::WindowManager,
20 public mojo::ErrorHandler {
21 public:
22 // See description above |from_vm_| for details on |from_vm|.
23 // WindowManagerImpl deletes itself on connection errors. WindowManagerApp
24 // also deletes WindowManagerImpl in its destructor.
25 WindowManagerImpl(WindowManagerApp* window_manager, bool from_vm);
26 ~WindowManagerImpl() override;
27
28 void Bind(mojo::ScopedMessagePipeHandle window_manager_pipe);
29
30 void NotifyViewFocused(mojo::Id focused_id);
31 void NotifyWindowActivated(mojo::Id active_id);
32 void NotifyCaptureChanged(mojo::Id capture_id);
33
34 private:
35 // mojo::WindowManager:
36 void Embed(const mojo::String& url,
37 mojo::InterfaceRequest<mojo::ServiceProvider> services,
38 mojo::ServiceProviderPtr exposed_services) override;
39 void SetCapture(uint32_t view_id,
40 const mojo::Callback<void(bool)>& callback) override;
41 void FocusWindow(uint32_t view_id,
42 const mojo::Callback<void(bool)>& callback) override;
43 void ActivateWindow(uint32_t view_id,
44 const mojo::Callback<void(bool)>& callback) override;
45 void GetFocusedAndActiveViews(
46 mojo::WindowManagerObserverPtr observer,
47 const mojo::WindowManager::GetFocusedAndActiveViewsCallback& callback)
48 override;
49
50 // mojo::ErrorHandler:
51 void OnConnectionError() override;
52
53 WindowManagerApp* window_manager_;
54
55 // Whether this connection originated from the ViewManager. Connections that
56 // originate from the view manager are expected to have clients. Connections
57 // that don't originate from the view manager do not have clients.
58 const bool from_vm_;
59
60 mojo::Binding<mojo::WindowManager> binding_;
61 mojo::WindowManagerObserverPtr observer_;
62
63 DISALLOW_COPY_AND_ASSIGN(WindowManagerImpl);
64 };
65
66 } // namespace window_manager
67
68 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/window_manager/window_manager_delegate.h ('k') | mojo/services/window_manager/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698