OLD | NEW |
(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 COMPONENTS_MUS_EXAMPLE_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_ |
| 6 #define COMPONENTS_MUS_EXAMPLE_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/mus/public/cpp/window_observer.h" |
| 10 #include "ui/compositor/paint_cache.h" |
| 11 #include "ui/views/window/custom_frame_view.h" |
| 12 |
| 13 class NonClientFrameViewImpl : public views::CustomFrameView, |
| 14 public mus::WindowObserver { |
| 15 public: |
| 16 explicit NonClientFrameViewImpl(mus::Window* window); |
| 17 ~NonClientFrameViewImpl() override; |
| 18 |
| 19 private: |
| 20 // CustomFrameView: |
| 21 gfx::Rect GetBoundsForClientView() const override; |
| 22 void OnPaint(gfx::Canvas* canvas) override; |
| 23 void PaintChildren(const ui::PaintContext& context) override; |
| 24 |
| 25 // mus::WindowObserver: |
| 26 void OnWindowClientAreaChanged(mus::Window* window, |
| 27 const gfx::Insets& old_client_area) override; |
| 28 void OnWindowDestroyed(mus::Window* window) override; |
| 29 |
| 30 private: |
| 31 mus::Window* window_; |
| 32 ui::PaintCache paint_cache_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(NonClientFrameViewImpl); |
| 35 }; |
| 36 |
| 37 #endif // COMPONENTS_MUS_EXAMPLE_WM_NON_CLIENT_FRAME_VIEW_IMPL_H_ |
OLD | NEW |