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

Side by Side Diff: mash/wm/non_client_frame_view_impl.h

Issue 1459653002: Gets mustash frames looking like that of ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 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 | « mash/wm/non_client_frame_controller.cc ('k') | mash/wm/non_client_frame_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 MASH_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_
6 #define MASH_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "components/mus/public/cpp/window_observer.h"
11 #include "ui/compositor/paint_cache.h"
12 #include "ui/views/window/custom_frame_view.h"
13
14 class MoveLoop;
15
16 class NonClientFrameViewImpl : public views::CustomFrameView,
17 public mus::WindowObserver {
18 public:
19 explicit NonClientFrameViewImpl(mus::Window* window);
20 ~NonClientFrameViewImpl() override;
21
22 private:
23 // CustomFrameView:
24 gfx::Rect GetBoundsForClientView() const override;
25 void OnPaint(gfx::Canvas* canvas) override;
26 void PaintChildren(const ui::PaintContext& context) override;
27 bool OnMousePressed(const ui::MouseEvent& event) override;
28 bool OnMouseDragged(const ui::MouseEvent& event) override;
29 void OnMouseReleased(const ui::MouseEvent& event) override;
30 void OnMouseCaptureLost() override;
31
32 // mus::WindowObserver:
33 void OnWindowClientAreaChanged(mus::Window* window,
34 const gfx::Insets& old_client_area) override;
35 void OnWindowDestroyed(mus::Window* window) override;
36
37 private:
38 bool StartMoveLoopIfNecessary(const ui::Event& event);
39 void ContinueMove(const ui::Event& event);
40 void StopMove();
41
42 mus::Window* window_;
43 ui::PaintCache paint_cache_;
44 scoped_ptr<MoveLoop> move_loop_;
45
46 DISALLOW_COPY_AND_ASSIGN(NonClientFrameViewImpl);
47 };
48
49 #endif // MASH_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « mash/wm/non_client_frame_controller.cc ('k') | mash/wm/non_client_frame_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698