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

Side by Side Diff: examples/wm_flow/wm/frame_controller.h

Issue 718573002: Revert "Remove aura and make a pure mojo::View version of the aura::Window FocusController." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « examples/window_manager/window_manager.cc ('k') | examples/wm_flow/wm/frame_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ 5 #ifndef EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
6 #define EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ 6 #define EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/services/public/cpp/view_manager/view_observer.h" 9 #include "mojo/services/public/cpp/view_manager/view_observer.h"
10 #include "mojo/services/window_manager/focus_controller.h"
11 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
12 11
12 namespace aura {
13 namespace client {
14 class ActivationClient;
15 }
16 }
17
13 namespace mojo { 18 namespace mojo {
14 class NativeWidgetViewManager; 19 class NativeWidgetViewManager;
15 class Shell; 20 class Shell;
16 class View; 21 class View;
17 class WindowManagerApp; 22 class WindowManagerApp;
18 } 23 }
19 24
20 namespace views { 25 namespace views {
21 class View; 26 class View;
22 class Widget; 27 class Widget;
23 } 28 }
24 29
25 // FrameController encapsulates the window manager's frame additions to a window 30 // FrameController encapsulates the window manager's frame additions to a window
26 // created by an application. It renders the content of the frame and responds 31 // created by an application. It renders the content of the frame and responds
27 // to any events targeted at it. 32 // to any events targeted at it.
28 class FrameController : mojo::ViewObserver { 33 class FrameController : mojo::ViewObserver {
29 public: 34 public:
30 FrameController(mojo::Shell* shell, 35 FrameController(mojo::Shell* shell,
31 mojo::View* view, 36 mojo::View* view,
32 mojo::View** app_view, 37 mojo::View** app_view,
38 aura::client::ActivationClient* activation_client,
33 mojo::WindowManagerApp* window_manager_app); 39 mojo::WindowManagerApp* window_manager_app);
34 virtual ~FrameController(); 40 virtual ~FrameController();
35 41
36 void CloseWindow(); 42 void CloseWindow();
37 void ToggleMaximize(); 43 void ToggleMaximize();
38 44
39 void ActivateWindow(); 45 void ActivateWindow();
40 46
41 private: 47 private:
42 class LayoutManager; 48 class LayoutManager;
43 friend class LayoutManager; 49 friend class LayoutManager;
44 class FrameEventHandler; 50 class FrameEventHandler;
45 51
46 virtual void OnViewDestroyed(mojo::View* view) override; 52 virtual void OnViewDestroyed(mojo::View* view) override;
47 53
48 mojo::View* view_; 54 mojo::View* view_;
49 mojo::View* app_view_; 55 mojo::View* app_view_;
50 views::View* frame_view_; 56 views::View* frame_view_;
51 LayoutManager* frame_view_layout_manager_; 57 LayoutManager* frame_view_layout_manager_;
52 views::Widget* widget_; 58 views::Widget* widget_;
53 bool maximized_; 59 bool maximized_;
54 gfx::Rect restored_bounds_; 60 gfx::Rect restored_bounds_;
61 aura::client::ActivationClient* activation_client_;
55 mojo::WindowManagerApp* window_manager_app_; 62 mojo::WindowManagerApp* window_manager_app_;
56 scoped_ptr<FrameEventHandler> frame_event_handler_; 63 scoped_ptr<FrameEventHandler> frame_event_handler_;
57 64
58 DISALLOW_COPY_AND_ASSIGN(FrameController); 65 DISALLOW_COPY_AND_ASSIGN(FrameController);
59 }; 66 };
60 67
61 #endif // EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_ 68 #endif // EXAMPLES_WM_FLOW_WM_FRAME_CONTROLLER_H_
OLDNEW
« no previous file with comments | « examples/window_manager/window_manager.cc ('k') | examples/wm_flow/wm/frame_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698