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

Side by Side Diff: sky/tools/debugger/debugger.h

Issue 883983004: Rename SkyDebugger to KioskWM and move to /services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename to KioskWM per discussion with jamesr Created 5 years, 10 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 #include "base/memory/weak_ptr.h"
6 #include "mojo/public/cpp/application/application_delegate.h"
7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "mojo/public/cpp/application/connect.h"
9 #include "mojo/public/cpp/application/service_provider_impl.h"
10 #include "mojo/services/input_events/public/interfaces/input_events.mojom.h"
11 #include "mojo/services/navigation/public/interfaces/navigation.mojom.h"
12 #include "mojo/services/view_manager/public/cpp/view_manager.h"
13 #include "mojo/services/view_manager/public/cpp/view_manager_delegate.h"
14 #include "mojo/services/view_manager/public/cpp/view_observer.h"
15 #include "services/window_manager/window_manager_app.h"
16 #include "services/window_manager/window_manager_delegate.h"
17 #include "sky/tools/debugger/debugger.mojom.h"
18 #include "sky/tools/debugger/navigator_host_impl.h"
19 #include "sky/viewer/services/inspector.mojom.h"
20
21 namespace sky {
22 namespace debugger {
23
24 class SkyDebugger : public mojo::ApplicationDelegate,
25 public mojo::ViewManagerDelegate,
26 public mojo::ViewObserver,
27 public mojo::InterfaceFactory<Debugger>,
28 public mojo::InterfaceImpl<Debugger>,
29 public window_manager::WindowManagerDelegate {
30 public:
31 SkyDebugger();
32 virtual ~SkyDebugger();
33
34 base::WeakPtr<SkyDebugger> GetWeakPtr();
35
36 // Overridden from Debugger
37 void NavigateToURL(const mojo::String& url) override;
38 void InjectInspector() override;
39 void Shutdown() override;
40
41 private:
42 // Overridden from mojo::ApplicationDelegate:
43 void Initialize(mojo::ApplicationImpl* app) override;
44 bool ConfigureIncomingConnection(
45 mojo::ApplicationConnection* connection) override;
46 bool ConfigureOutgoingConnection(
47 mojo::ApplicationConnection* connection) override;
48
49 // Overridden from mojo::ViewManagerDelegate:
50 void OnEmbed(mojo::View* root,
51 mojo::InterfaceRequest<mojo::ServiceProvider> services,
52 mojo::ServiceProviderPtr exposed_services) override;
53 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override;
54
55 // Overriden from mojo::ViewObserver:
56 void OnViewDestroyed(mojo::View* view) override;
57 void OnViewBoundsChanged(mojo::View* view,
58 const mojo::Rect& old_bounds,
59 const mojo::Rect& new_bounds) override;
60
61 // Overridden from InterfaceFactory<Debugger>:
62 void Create(mojo::ApplicationConnection* connection,
63 mojo::InterfaceRequest<Debugger> request) override;
64
65 // Overridden from WindowManagerDelegate
66 void Embed(const mojo::String& url,
67 mojo::InterfaceRequest<mojo::ServiceProvider> services,
68 mojo::ServiceProviderPtr exposed_services) override;
69
70 scoped_ptr<window_manager::WindowManagerApp> window_manager_app_;
71
72 // TODO(eseidel): This is per-embedding state and should be separate
73 // from the ApplicationDelegate!
74 mojo::View* root_;
75 mojo::View* content_;
76 std::string default_url_;
77 std::string pending_url_;
78
79 mojo::ServiceProviderPtr viewer_services_;
80
81 NavigatorHostFactory navigator_host_factory_;
82 mojo::ServiceProviderImpl exposed_services_impl_;
83
84 base::WeakPtrFactory<SkyDebugger> weak_factory_;
85
86 DISALLOW_COPY_AND_ASSIGN(SkyDebugger);
87 };
88
89 } // namespace debugger
90 } // namespace sky
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698