| 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 23 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 // A panel of controls intended to demonstrate the functionality of the window | 36 // A panel of controls intended to demonstrate the functionality of the window |
| 37 // manager. | 37 // manager. |
| 38 class DebugPanel : public views::LayoutManager, public views::ButtonListener { | 38 class DebugPanel : public views::LayoutManager, public views::ButtonListener { |
| 39 public: | 39 public: |
| 40 class Delegate { | 40 class Delegate { |
| 41 public: | 41 public: |
| 42 virtual void CloseTopWindow() = 0; | 42 virtual void CloseTopWindow() = 0; |
| 43 virtual void RequestNavigate( | 43 virtual void RequestNavigate( |
| 44 uint32 source_node_id, navigation::Target target, | 44 uint32 source_node_id, Target target, |
| 45 navigation::NavigationDetailsPtr nav_details) = 0; | 45 NavigationDetailsPtr nav_details) = 0; |
| 46 protected: | 46 protected: |
| 47 virtual ~Delegate(){} | 47 virtual ~Delegate(){} |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 DebugPanel(Delegate* delegate, view_manager::Node* node); | 50 DebugPanel(Delegate* delegate, view_manager::Node* node); |
| 51 virtual ~DebugPanel(); | 51 virtual ~DebugPanel(); |
| 52 | 52 |
| 53 navigation::Target navigation_target() const; | 53 Target navigation_target() const; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 // LayoutManager overrides: | 56 // LayoutManager overrides: |
| 57 virtual gfx::Size GetPreferredSize(const views::View* view) const OVERRIDE; | 57 virtual gfx::Size GetPreferredSize(const views::View* view) const OVERRIDE; |
| 58 virtual void Layout(views::View* host) OVERRIDE; | 58 virtual void Layout(views::View* host) OVERRIDE; |
| 59 virtual void ButtonPressed(views::Button* sender, | 59 virtual void ButtonPressed(views::Button* sender, |
| 60 const ui::Event& event) OVERRIDE; | 60 const ui::Event& event) OVERRIDE; |
| 61 | 61 |
| 62 void Navigate(const std::string& url); | 62 void Navigate(const std::string& url); |
| 63 | 63 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 views::Button* close_last_; | 74 views::Button* close_last_; |
| 75 views::Button* cross_app_; | 75 views::Button* cross_app_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(DebugPanel); | 77 DISALLOW_COPY_AND_ASSIGN(DebugPanel); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // examples | 80 } // examples |
| 81 } // mojo | 81 } // mojo |
| 82 | 82 |
| 83 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ | 83 #endif // MOJO_EXAMPLES_WINDOW_MANAGER_DEBUG_PANEL_H_ |
| OLD | NEW |