OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ |
| 6 #define MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ |
| 7 |
| 8 #include "mojo/services/public/cpp/view_manager/view_observer.h" |
| 9 #include "ui/gfx/geometry/rect.h" |
| 10 |
| 11 namespace mojo { |
| 12 class NativeWidgetViewManager; |
| 13 class View; |
| 14 } |
| 15 |
| 16 namespace views { |
| 17 class View; |
| 18 class Widget; |
| 19 } |
| 20 |
| 21 // FrameController encapsulates the window manager's frame additions to a window |
| 22 // created by an application. It renders the content of the frame and responds |
| 23 // to any events targeted at it. |
| 24 class FrameController : mojo::ViewObserver { |
| 25 public: |
| 26 FrameController(mojo::View* view, mojo::View** app_view); |
| 27 virtual ~FrameController(); |
| 28 |
| 29 void CloseWindow(); |
| 30 void ToggleMaximize(); |
| 31 |
| 32 private: |
| 33 class LayoutManager; |
| 34 friend class LayoutManager; |
| 35 |
| 36 virtual void OnViewDestroyed(mojo::View* view) MOJO_OVERRIDE; |
| 37 |
| 38 mojo::View* view_; |
| 39 mojo::View* app_view_; |
| 40 views::View* frame_view_; |
| 41 LayoutManager* frame_view_layout_manager_; |
| 42 views::Widget* widget_; |
| 43 bool maximized_; |
| 44 gfx::Rect restored_bounds_; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(FrameController); |
| 47 }; |
| 48 |
| 49 #endif // MOJO_EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ |
OLD | NEW |