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

Side by Side Diff: mandoline/ui/browser/browser.h

Issue 1136363002: Remove unnecessary method from Browser object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | mandoline/ui/browser/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_BROWSER_H_ 5 #ifndef MANDOLINE_UI_BROWSER_BROWSER_H_
6 #define MANDOLINE_UI_BROWSER_BROWSER_H_ 6 #define MANDOLINE_UI_BROWSER_BROWSER_H_
7 7
8 #include "base/memory/weak_ptr.h"
9 #include "components/view_manager/public/cpp/view_manager.h" 8 #include "components/view_manager/public/cpp/view_manager.h"
10 #include "components/view_manager/public/cpp/view_manager_delegate.h" 9 #include "components/view_manager/public/cpp/view_manager_delegate.h"
11 #include "components/window_manager/window_manager_app.h" 10 #include "components/window_manager/window_manager_app.h"
12 #include "components/window_manager/window_manager_delegate.h" 11 #include "components/window_manager/window_manager_delegate.h"
13 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h" 12 #include "mandoline/services/navigation/public/interfaces/navigation.mojom.h"
14 #include "mandoline/ui/browser/navigator_host_impl.h" 13 #include "mandoline/ui/browser/navigator_host_impl.h"
15 #include "mandoline/ui/browser/omnibox.mojom.h" 14 #include "mandoline/ui/browser/omnibox.mojom.h"
16 #include "third_party/mojo/src/mojo/public/cpp/application/application_delegate. h" 15 #include "third_party/mojo/src/mojo/public/cpp/application/application_delegate. h"
17 #include "third_party/mojo/src/mojo/public/cpp/application/application_impl.h" 16 #include "third_party/mojo/src/mojo/public/cpp/application/application_impl.h"
18 #include "third_party/mojo/src/mojo/public/cpp/application/connect.h" 17 #include "third_party/mojo/src/mojo/public/cpp/application/connect.h"
19 #include "third_party/mojo/src/mojo/public/cpp/application/service_provider_impl .h" 18 #include "third_party/mojo/src/mojo/public/cpp/application/service_provider_impl .h"
20 #include "ui/mojo/events/input_events.mojom.h" 19 #include "ui/mojo/events/input_events.mojom.h"
21 #include "url/gurl.h" 20 #include "url/gurl.h"
22 21
23 namespace mandoline { 22 namespace mandoline {
24 23
25 class BrowserUI; 24 class BrowserUI;
26 class MergedServiceProvider; 25 class MergedServiceProvider;
27 26
28 class Browser : public mojo::ApplicationDelegate, 27 class Browser : public mojo::ApplicationDelegate,
29 public mojo::ViewManagerDelegate, 28 public mojo::ViewManagerDelegate,
30 public window_manager::WindowManagerDelegate, 29 public window_manager::WindowManagerDelegate,
31 public OmniboxClient, 30 public OmniboxClient,
32 public mojo::InterfaceFactory<mojo::NavigatorHost> { 31 public mojo::InterfaceFactory<mojo::NavigatorHost> {
33 public: 32 public:
34 Browser(); 33 Browser();
35 ~Browser() override; 34 ~Browser() override;
36 35
37 base::WeakPtr<Browser> GetWeakPtr();
38
39 void ReplaceContentWithURL(const mojo::String& url); 36 void ReplaceContentWithURL(const mojo::String& url);
40 37
41 mojo::View* content() { return content_; } 38 mojo::View* content() { return content_; }
42 mojo::View* omnibox() { return omnibox_; } 39 mojo::View* omnibox() { return omnibox_; }
43 40
44 const GURL& current_url() const { return current_url_; } 41 const GURL& current_url() const { return current_url_; }
45 42
46 private: 43 private:
47 // Overridden from mojo::ApplicationDelegate: 44 // Overridden from mojo::ApplicationDelegate:
48 void Initialize(mojo::ApplicationImpl* app) override; 45 void Initialize(mojo::ApplicationImpl* app) override;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 85
89 mojo::ServiceProviderImpl exposed_services_impl_; 86 mojo::ServiceProviderImpl exposed_services_impl_;
90 scoped_ptr<MergedServiceProvider> merged_service_provider_; 87 scoped_ptr<MergedServiceProvider> merged_service_provider_;
91 88
92 NavigatorHostImpl navigator_host_; 89 NavigatorHostImpl navigator_host_;
93 90
94 GURL current_url_; 91 GURL current_url_;
95 92
96 scoped_ptr<BrowserUI> ui_; 93 scoped_ptr<BrowserUI> ui_;
97 94
98 base::WeakPtrFactory<Browser> weak_factory_;
99
100 DISALLOW_COPY_AND_ASSIGN(Browser); 95 DISALLOW_COPY_AND_ASSIGN(Browser);
101 }; 96 };
102 97
103 } // namespace mandoline 98 } // namespace mandoline
104 99
105 #endif // MANDOLINE_UI_BROWSER_BROWSER_H_ 100 #endif // MANDOLINE_UI_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | mandoline/ui/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698