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.
5 #ifndef MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_
6 #define MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_
8 #include "mandoline/ui/aura/aura_init.h"
9 #include "mandoline/ui/browser/browser_ui.h"
10 #include "mandoline/ui/browser/public/interfaces/omnibox.mojom.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/layout/layout_manager.h"
27 class DesktopUI
: public BrowserUI
,
28 public views::LayoutManager
,
29 public views::ButtonListener
{
31 DesktopUI(Browser
* browser
, mojo::ApplicationImpl
* application_impl
);
32 ~DesktopUI() override
;
35 // Overridden from BrowserUI
36 void Init(mojo::View
* root
) override
;
37 void OnURLChanged() override
;
39 // Overridden from views::LayoutManager:
40 gfx::Size
GetPreferredSize(const views::View
* view
) const override
;
41 void Layout(views::View
* host
) override
;
43 // Overridden from views::ButtonListener:
44 void ButtonPressed(views::Button
* sender
, const ui::Event
& event
) override
;
48 mojo::ApplicationImpl
* application_impl_
;
49 views::LabelButton
* omnibox_launcher_
;
53 mojo::Binding
<OmniboxClient
> client_binding_
;
55 DISALLOW_COPY_AND_ASSIGN(DesktopUI
);
58 } // namespace mandoline
60 #endif // MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_