Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Unified Diff: mojo/examples/window_manager/debug_panel.h

Issue 383123006: Preliminary interactive layout of window manager's demo_launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/examples/window_manager/debug_panel.h
diff --git a/mojo/examples/window_manager/debug_panel.h b/mojo/examples/window_manager/debug_panel.h
index 532ebce14050e34b7f8b152468514dc065170bd2..b6dee32057267909f2639a146174e48b381105a1 100644
--- a/mojo/examples/window_manager/debug_panel.h
+++ b/mojo/examples/window_manager/debug_panel.h
@@ -8,6 +8,7 @@
#include <string>
#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
+#include "mojo/services/public/cpp/view_manager/node_observer.h"
#include "mojo/services/public/interfaces/navigation/navigation.mojom.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/layout/layout_manager.h"
@@ -35,7 +36,9 @@ const SkColor kColors[] = { SK_ColorYELLOW,
// A panel of controls intended to demonstrate the functionality of the window
// manager.
-class DebugPanel : public views::LayoutManager, public views::ButtonListener {
+ class DebugPanel : public views::LayoutManager,
+ public views::ButtonListener,
+ public view_manager::NodeObserver {
public:
class Delegate {
public:
@@ -59,10 +62,17 @@ class DebugPanel : public views::LayoutManager, public views::ButtonListener {
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
+ // NodeObserver overrides:
+ virtual void OnNodeBoundsChanged(view_manager::Node* node,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) OVERRIDE;
+
void Navigate(const std::string& url);
Delegate* delegate_;
view_manager::Node* node_;
+ views::View* contents_view_;
+ views::Widget* widget_;
views::Label* navigation_target_label_;
views::RadioButton* navigation_target_new_;

Powered by Google App Engine
This is Rietveld 408576698