OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ | 5 #ifndef MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ |
6 #define MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ | 6 #define MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" | 10 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 | 33 |
34 // A panel of controls intended to demonstrate the functionality of the window | 34 // A panel of controls intended to demonstrate the functionality of the window |
35 // manager. | 35 // manager. |
36 class DebugPanel : public views::LayoutManager, public views::ButtonListener { | 36 class DebugPanel : public views::LayoutManager, public views::ButtonListener { |
37 public: | 37 public: |
38 class Delegate { | 38 class Delegate { |
39 public: | 39 public: |
40 virtual void CloseTopWindow() = 0; | 40 virtual void CloseTopWindow() = 0; |
41 virtual void RequestNavigate( | 41 virtual void RequestNavigate( |
42 uint32 source_node_id, navigation::Target target, | 42 uint32 source_node_id, Target target, |
43 navigation::NavigationDetailsPtr nav_details) = 0; | 43 NavigationDetailsPtr nav_details) = 0; |
44 protected: | 44 protected: |
45 virtual ~Delegate(){} | 45 virtual ~Delegate(){} |
46 }; | 46 }; |
47 | 47 |
48 DebugPanel(Delegate* delegate, Node* node); | 48 DebugPanel(Delegate* delegate, Node* node); |
49 virtual ~DebugPanel(); | 49 virtual ~DebugPanel(); |
50 | 50 |
51 navigation::Target navigation_target() const; | 51 Target navigation_target() const; |
52 | 52 |
53 private: | 53 private: |
54 // LayoutManager overrides: | 54 // LayoutManager overrides: |
55 virtual gfx::Size GetPreferredSize(const views::View* view) const OVERRIDE; | 55 virtual gfx::Size GetPreferredSize(const views::View* view) const OVERRIDE; |
56 virtual void Layout(views::View* host) OVERRIDE; | 56 virtual void Layout(views::View* host) OVERRIDE; |
57 virtual void ButtonPressed(views::Button* sender, | 57 virtual void ButtonPressed(views::Button* sender, |
58 const ui::Event& event) OVERRIDE; | 58 const ui::Event& event) OVERRIDE; |
59 | 59 |
60 void Navigate(const std::string& url); | 60 void Navigate(const std::string& url); |
61 | 61 |
(...skipping 10 matching lines...) Expand all Loading... |
72 views::Button* close_last_; | 72 views::Button* close_last_; |
73 views::Button* cross_app_; | 73 views::Button* cross_app_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(DebugPanel); | 75 DISALLOW_COPY_AND_ASSIGN(DebugPanel); |
76 }; | 76 }; |
77 | 77 |
78 } // examples | 78 } // examples |
79 } // mojo | 79 } // mojo |
80 | 80 |
81 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ | 81 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ |
OLD | NEW |