win_frame_view.cc 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "atom/browser/ui/views/win_frame_view.h"
  5. #include "atom/browser/native_window_views.h"
  6. #include "ui/views/widget/widget.h"
  7. #include "ui/views/win/hwnd_util.h"
  8. namespace atom {
  9. namespace {
  10. const char kViewClassName[] = "WinFrameView";
  11. } // namespace
  12. WinFrameView::WinFrameView() {}
  13. WinFrameView::~WinFrameView() {}
  14. gfx::Rect WinFrameView::GetWindowBoundsForClientBounds(
  15. const gfx::Rect& client_bounds) const {
  16. return views::GetWindowBoundsForClientBounds(
  17. static_cast<views::View*>(const_cast<WinFrameView*>(this)),
  18. client_bounds);
  19. }
  20. int WinFrameView::NonClientHitTest(const gfx::Point& point) {
  21. if (window_->has_frame())
  22. return frame_->client_view()->NonClientHitTest(point);
  23. else
  24. return FramelessView::NonClientHitTest(point);
  25. }
  26. const char* WinFrameView::GetClassName() const {
  27. return kViewClassName;
  28. }
  29. } // namespace atom