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

Side by Side Diff: mandoline/ui/phone_ui/phone_browser_application_delegate.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_ 5 #ifndef MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_
6 #define MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_ 6 #define MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 public mus::WindowTreeDelegate, 32 public mus::WindowTreeDelegate,
33 public mus::WindowObserver, 33 public mus::WindowObserver,
34 public web_view::mojom::WebViewClient, 34 public web_view::mojom::WebViewClient,
35 public mojo::InterfaceFactory<LaunchHandler> { 35 public mojo::InterfaceFactory<LaunchHandler> {
36 public: 36 public:
37 PhoneBrowserApplicationDelegate(); 37 PhoneBrowserApplicationDelegate();
38 ~PhoneBrowserApplicationDelegate() override; 38 ~PhoneBrowserApplicationDelegate() override;
39 39
40 private: 40 private:
41 // Overridden from mojo::ApplicationDelegate: 41 // Overridden from mojo::ApplicationDelegate:
42 void Initialize(mojo::ApplicationImpl* app) override; 42 void Initialize(mojo::Shell* shell, const std::string& url,
43 uint32_t id) override;
43 bool AcceptConnection( 44 bool AcceptConnection(
44 mojo::ApplicationConnection* connection) override; 45 mojo::ApplicationConnection* connection) override;
45 46
46 // Overridden from LaunchHandler: 47 // Overridden from LaunchHandler:
47 void LaunchURL(const mojo::String& url) override; 48 void LaunchURL(const mojo::String& url) override;
48 49
49 // Overridden from mus::WindowTreeDelegate: 50 // Overridden from mus::WindowTreeDelegate:
50 void OnEmbed(mus::Window* root) override; 51 void OnEmbed(mus::Window* root) override;
51 void OnConnectionLost(mus::WindowTreeConnection* connection) override; 52 void OnConnectionLost(mus::WindowTreeConnection* connection) override;
52 53
(...skipping 12 matching lines...) Expand all
65 void FindInPageMatchCountUpdated(int32_t request_id, 66 void FindInPageMatchCountUpdated(int32_t request_id,
66 int32_t count, 67 int32_t count,
67 bool final_update) override {} 68 bool final_update) override {}
68 void FindInPageSelectionUpdated(int32_t request_id, 69 void FindInPageSelectionUpdated(int32_t request_id,
69 int32_t active_match_ordinal) override {} 70 int32_t active_match_ordinal) override {}
70 71
71 // Overridden from mojo::InterfaceFactory<LaunchHandler>: 72 // Overridden from mojo::InterfaceFactory<LaunchHandler>:
72 void Create(mojo::ApplicationConnection* connection, 73 void Create(mojo::ApplicationConnection* connection,
73 mojo::InterfaceRequest<LaunchHandler> request) override; 74 mojo::InterfaceRequest<LaunchHandler> request) override;
74 75
75 mojo::ApplicationImpl* app_; 76 mojo::Shell* shell_;
76 mus::mojom::WindowTreeHostPtr host_; 77 mus::mojom::WindowTreeHostPtr host_;
77 78
78 mus::Window* root_; 79 mus::Window* root_;
79 mus::Window* content_; 80 mus::Window* content_;
80 web_view::WebView web_view_; 81 web_view::WebView web_view_;
81 82
82 mojo::String default_url_; 83 mojo::String default_url_;
83 84
84 mojo::WeakBindingSet<LaunchHandler> launch_handler_bindings_; 85 mojo::WeakBindingSet<LaunchHandler> launch_handler_bindings_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(PhoneBrowserApplicationDelegate); 87 DISALLOW_COPY_AND_ASSIGN(PhoneBrowserApplicationDelegate);
87 }; 88 };
88 89
89 } // namespace mandoline 90 } // namespace mandoline
90 91
91 #endif // MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_ 92 #endif // MANDOLINE_UI_PHONE_UI_PHONE_BROWSER_APPLICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « mandoline/ui/omnibox/omnibox_application.cc ('k') | mandoline/ui/phone_ui/phone_browser_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698