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

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

Issue 690363002: Make clicking links work in SkyDB (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/tools/debugger/DEPS ('k') | sky/tools/debugger/debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/public/cpp/view_manager/view_manager.h"
11 #include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
12 #include "mojo/services/public/cpp/view_manager/view_observer.h"
13 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h"
14 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
15 #include "mojo/services/window_manager/window_manager_app.h"
16 #include "mojo/services/window_manager/window_manager_delegate.h"
17 #include "sky/tools/debugger/debugger.mojom.h"
18 #include "sky/tools/debugger/focus_rules.h"
19 #include "sky/tools/debugger/navigator_host_impl.h"
20 #include "sky/viewer/services/inspector.mojom.h"
21
22 namespace sky {
23 namespace debugger {
24
25 class SkyDebugger : public mojo::ApplicationDelegate,
26 public mojo::ViewManagerDelegate,
27 public mojo::ViewObserver,
28 public mojo::InterfaceFactory<Debugger>,
29 public mojo::InterfaceImpl<Debugger> {
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
40 private:
41 // Overridden from mojo::ApplicationDelegate:
42 void Initialize(mojo::ApplicationImpl* app) override;
43 bool ConfigureIncomingConnection(
44 mojo::ApplicationConnection* connection) override;
45 bool ConfigureOutgoingConnection(
46 mojo::ApplicationConnection* connection) override;
47
48 // Overridden from mojo::ViewManagerDelegate:
49 void OnEmbed(mojo::ViewManager* view_manager,
50 mojo::View* root,
51 mojo::ServiceProviderImpl* exported_services,
52 scoped_ptr<mojo::ServiceProvider> imported_services) override;
53 void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override;
54 void OnViewDestroyed(mojo::View* view) override;
55 void OnViewBoundsChanged(mojo::View* view,
56 const mojo::Rect& old_bounds,
57 const mojo::Rect& new_bounds) override;
58
59 // Overridden from InterfaceFactory<Debugger>
60 void Create(mojo::ApplicationConnection* connection,
61 mojo::InterfaceRequest<Debugger> request) override;
62
63 scoped_ptr<mojo::WindowManagerApp> window_manager_app_;
64
65 mojo::ViewManager* view_manager_;
66 mojo::View* root_;
67 mojo::View* content_;
68 std::string pending_url_;
69
70 scoped_ptr<mojo::ServiceProvider> viewer_services_;
71
72 NavigatorHostFactory navigator_host_factory_;
73
74 base::WeakPtrFactory<SkyDebugger> weak_factory_;
75
76 DISALLOW_COPY_AND_ASSIGN(SkyDebugger);
77 };
78
79 } // namespace debugger
80 } // namespace sky
OLDNEW
« no previous file with comments | « sky/tools/debugger/DEPS ('k') | sky/tools/debugger/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698