OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_ |
| 6 #define MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_ |
| 7 |
| 8 #include "mandoline/ui/aura/aura_init.h" |
| 9 #include "mandoline/ui/browser/browser_ui.h" |
| 10 #include "ui/views/controls/textfield/textfield_controller.h" |
| 11 #include "ui/views/layout/layout_manager.h" |
| 12 |
| 13 namespace mojo { |
| 14 class Shell; |
| 15 class View; |
| 16 } |
| 17 |
| 18 namespace mandoline { |
| 19 |
| 20 class Browser; |
| 21 |
| 22 class DesktopUI : public BrowserUI, |
| 23 public views::LayoutManager, |
| 24 public views::TextfieldController { |
| 25 public: |
| 26 DesktopUI(Browser* browser, mojo::Shell* shell); |
| 27 ~DesktopUI() override; |
| 28 |
| 29 private: |
| 30 // Overridden from BrowserUI |
| 31 void Init(mojo::View* root, mojo::View* content) override; |
| 32 |
| 33 // Overridden from views::LayoutManager: |
| 34 gfx::Size GetPreferredSize(const views::View* view) const override; |
| 35 void Layout(views::View* host) override; |
| 36 |
| 37 // Overridden from views::TextfieldController: |
| 38 bool HandleKeyEvent(views::Textfield* sender, |
| 39 const ui::KeyEvent& key_event) override; |
| 40 |
| 41 AuraInit aura_init_; |
| 42 Browser* browser_; |
| 43 mojo::Shell* shell_; |
| 44 views::Textfield* omnibox_; |
| 45 mojo::View* root_; |
| 46 mojo::View* content_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(DesktopUI); |
| 49 }; |
| 50 |
| 51 } // namespace mandoline |
| 52 |
| 53 #endif // MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_ |
OLD | NEW |