Stop retring GCM unregistration requests after reaching maximum number
[chromium-blink-merge.git] / mandoline / ui / browser / desktop / desktop_ui.h
blob3be7f1057eaf476b89aeaa233a0f407bc1615df6
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"
14 namespace mojo {
15 class Shell;
16 class View;
19 namespace views {
20 class LabelButton;
23 namespace mandoline {
25 class Browser;
27 class DesktopUI : public BrowserUI,
28 public views::LayoutManager,
29 public views::ButtonListener {
30 public:
31 DesktopUI(Browser* browser, mojo::ApplicationImpl* application_impl);
32 ~DesktopUI() override;
34 private:
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;
46 AuraInit aura_init_;
47 Browser* browser_;
48 mojo::ApplicationImpl* application_impl_;
49 views::LabelButton* omnibox_launcher_;
50 mojo::View* root_;
51 mojo::View* content_;
52 OmniboxPtr omnibox_;
53 mojo::Binding<OmniboxClient> client_binding_;
55 DISALLOW_COPY_AND_ASSIGN(DesktopUI);
58 } // namespace mandoline
60 #endif // MANDOLINE_UI_BROWSER_DESKTOP_DESKTOP_UI_H_