electron/atom/browser/ui/views/win_frame_view.cc

42 lines
1,015 B
C++
Raw Normal View History

// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/ui/views/win_frame_view.h"
2014-07-16 07:33:40 +00:00
#include "atom/browser/native_window_views.h"
#include "ui/views/widget/widget.h"
#include "ui/views/win/hwnd_util.h"
namespace atom {
namespace {
const char kViewClassName[] = "WinFrameView";
} // namespace
2018-04-18 01:55:30 +00:00
WinFrameView::WinFrameView() {}
2018-04-18 01:55:30 +00:00
WinFrameView::~WinFrameView() {}
gfx::Rect WinFrameView::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const {
return views::GetWindowBoundsForClientBounds(
static_cast<views::View*>(const_cast<WinFrameView*>(this)),
client_bounds);
}
int WinFrameView::NonClientHitTest(const gfx::Point& point) {
2014-07-16 07:33:40 +00:00
if (window_->has_frame())
return frame_->client_view()->NonClientHitTest(point);
else
return FramelessView::NonClientHitTest(point);
}
const char* WinFrameView::GetClassName() const {
return kViewClassName;
}
} // namespace atom