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(uint32 source_view_id
,
38 URLRequestPtr url_request
) = 0;
44 DebugPanel(Delegate
* delegate
, View
* view
);
45 virtual ~DebugPanel();
47 Target
navigation_target() const;
50 // LayoutManager overrides:
51 virtual gfx::Size
GetPreferredSize(const views::View
* view
) const OVERRIDE
;
52 virtual void Layout(views::View
* host
) OVERRIDE
;
53 virtual void ButtonPressed(views::Button
* sender
,
54 const ui::Event
& event
) OVERRIDE
;
56 void Navigate(const std::string
& url
);
61 views::Label
* navigation_target_label_
;
62 views::RadioButton
* navigation_target_new_
;
63 views::RadioButton
* navigation_target_source_
;
64 views::RadioButton
* navigation_target_default_
;
66 views::Button
* colored_square_
;
67 views::Button
* close_last_
;
68 views::Button
* cross_app_
;
70 DISALLOW_COPY_AND_ASSIGN(DebugPanel
);
76 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_