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

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

Issue 1141453002: Makes browser resize content when root bounds change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to androidui 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/android/android_ui.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_ANDROID_ANDROID_UI_H_ 5 #ifndef MANDOLINE_UI_BROWSER_ANDROID_ANDROID_UI_H_
6 #define MANDOLINE_UI_BROWSER_ANDROID_ANDROID_UI_H_ 6 #define MANDOLINE_UI_BROWSER_ANDROID_ANDROID_UI_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/view_manager/public/cpp/view_observer.h"
9 #include "mandoline/ui/browser/browser_ui.h" 10 #include "mandoline/ui/browser/browser_ui.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 class Shell; 13 class Shell;
13 class View; 14 class View;
14 } 15 }
15 16
16 namespace mandoline { 17 namespace mandoline {
17 18
18 class Browser; 19 class Browser;
19 20
20 class AndroidUI : public BrowserUI { 21 class AndroidUI : public BrowserUI,
22 public mojo::ViewObserver {
21 public: 23 public:
22 AndroidUI(Browser* browser, mojo::Shell* shell); 24 AndroidUI(Browser* browser, mojo::Shell* shell);
23 ~AndroidUI() override; 25 ~AndroidUI() override;
24 26
25 private: 27 private:
26 // Overridden from BrowserUI: 28 // Overridden from BrowserUI:
27 void Init(mojo::View* root, mojo::View* content) override; 29 void Init(mojo::View* root, mojo::View* content) override;
28 30
31 // Overriden from mojo::ViewObserver:
32 virtual void OnViewBoundsChanged(mojo::View* view,
33 const mojo::Rect& old_bounds,
34 const mojo::Rect& new_bounds) override;
35
29 Browser* browser_; 36 Browser* browser_;
30 mojo::Shell* shell_; 37 mojo::Shell* shell_;
31 mojo::View* root_; 38 mojo::View* root_;
32 mojo::View* content_; 39 mojo::View* content_;
33 40
34 DISALLOW_COPY_AND_ASSIGN(AndroidUI); 41 DISALLOW_COPY_AND_ASSIGN(AndroidUI);
35 }; 42 };
36 43
37 } // namespace mandoline 44 } // namespace mandoline
38 45
39 #endif // MANDOLINE_UI_BROWSER_ANDROID_ANDROID_UI_H_ 46 #endif // MANDOLINE_UI_BROWSER_ANDROID_ANDROID_UI_H_
OLDNEW
« no previous file with comments | « no previous file | mandoline/ui/browser/android/android_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698