// LinuxFrameView, public:
LinuxFrameView::LinuxFrameView()
- : window_(NULL),
- frame_(NULL),
- window_icon_(NULL),
+ : window_icon_(NULL),
minimize_button_(NULL),
maximize_button_(NULL),
restore_button_(NULL),
}
}
-int LinuxFrameView::ResizingBorderHitTest(const gfx::Point& point) {
- return GetHTComponentForFrame(point, FrameBorderThickness(),
- FrameBorderThickness() + kClientEdgeThickness, kResizeAreaCornerSize,
- kResizeAreaCornerSize, true);
-}
-
///////////////////////////////////////////////////////////////////////////////
// LinuxFrameView, NonClientFrameView implementation:
}
int LinuxFrameView::NonClientHitTest(const gfx::Point& point) {
+ if (!window_->has_frame())
+ return FramelessView::NonClientHitTest(point);
+
// Sanity check.
if (!bounds().Contains(point))
return HTNOWHERE;
- // Check for possible draggable region in the client area for the frameless
- // window.
- SkRegion* draggable_region = window_->draggable_region();
- if (draggable_region && draggable_region->contains(point.x(), point.y()))
- return HTCAPTION;
-
- // Support resizing frameless window by dragging the border.
- if (!window_->has_frame() && frame_->widget_delegate()->CanResize()) {
- int window_component = ResizingBorderHitTest(point);
- if (window_component != HTNOWHERE)
- return window_component;
- }
-
int frame_component = frame_->client_view()->NonClientHitTest(point);
// See if we're in the sysmenu region. (We check the ClientView first to be
namespace atom {
-class LinuxFrameView : public FramelessView
+class LinuxFrameView : public FramelessView,
public views::ButtonListener {
public:
LinuxFrameView();
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
- // Returns whether the |point| is on frameless window's resizing border.
- int ResizingBorderHitTest(const gfx::Point& point);
-
private:
// Returns the thickness of the border that makes up the window frame edges.
// This does not include any client edge.