1 // Copyright 2014 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 MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_
6 #define MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_
10 #include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/layout/layout_manager.h"
13 #include "ui/views/widget/widget_delegate.h"
29 // A panel of controls intended to demonstrate the functionality of the window
31 class DebugPanel
: public views::LayoutManager
, public views::ButtonListener
{
35 virtual void CloseTopWindow() = 0;
36 virtual void RequestNavigate(
37 uint32 source_view_id
, Target target
,
38 NavigationDetailsPtr nav_details
) = 0;
43 DebugPanel(Delegate
* delegate
, View
* view
);
44 virtual ~DebugPanel();
46 Target
navigation_target() const;
49 // LayoutManager overrides:
50 virtual gfx::Size
GetPreferredSize(const views::View
* view
) const OVERRIDE
;
51 virtual void Layout(views::View
* host
) OVERRIDE
;
52 virtual void ButtonPressed(views::Button
* sender
,
53 const ui::Event
& event
) OVERRIDE
;
55 void Navigate(const std::string
& url
);
60 views::Label
* navigation_target_label_
;
61 views::RadioButton
* navigation_target_new_
;
62 views::RadioButton
* navigation_target_source_
;
63 views::RadioButton
* navigation_target_default_
;
65 views::Button
* colored_square_
;
66 views::Button
* close_last_
;
67 views::Button
* cross_app_
;
69 DISALLOW_COPY_AND_ASSIGN(DebugPanel
);
75 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_