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

Unified Diff: mojo/examples/wm_flow/wm/frame_controller.h

Issue 549883003: Window controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: , Created 6 years, 3 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
« no previous file with comments | « mojo/examples/wm_flow/wm/DEPS ('k') | mojo/examples/wm_flow/wm/frame_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/wm_flow/wm/frame_controller.h
diff --git a/mojo/examples/wm_flow/wm/frame_controller.h b/mojo/examples/wm_flow/wm/frame_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..adb78404c5a2fb0d2bae0b7f60db104d709d1f46
--- /dev/null
+++ b/mojo/examples/wm_flow/wm/frame_controller.h
@@ -0,0 +1,49 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
+#define MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
+
+#include "mojo/services/public/cpp/view_manager/view_observer.h"
+#include "ui/gfx/geometry/rect.h"
+
+namespace mojo {
+class NativeWidgetViewManager;
+class View;
+}
+
+namespace views {
+class View;
+class Widget;
+}
+
+// FrameController encapsulates the window manager's frame additions to a window
+// created by an application. It renders the content of the frame and responds
+// to any events targeted at it.
+class FrameController : mojo::ViewObserver {
+ public:
+ FrameController(mojo::View* view, mojo::View** app_view);
+ virtual ~FrameController();
+
+ void CloseWindow();
+ void ToggleMaximize();
+
+ private:
+ class LayoutManager;
+ friend class LayoutManager;
+
+ virtual void OnViewDestroyed(mojo::View* view) MOJO_OVERRIDE;
+
+ mojo::View* view_;
+ mojo::View* app_view_;
+ views::View* frame_view_;
+ LayoutManager* frame_view_layout_manager_;
+ views::Widget* widget_;
+ bool maximized_;
+ gfx::Rect restored_bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameController);
+};
+
+#endif // MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
« no previous file with comments | « mojo/examples/wm_flow/wm/DEPS ('k') | mojo/examples/wm_flow/wm/frame_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698