| Index: ash/frame/frame_border_hit_test_controller.cc
|
| diff --git a/ash/frame/frame_border_hit_test_controller.cc b/ash/frame/frame_border_hit_test_controller.cc
|
| index ab254a3ba2b50cb6fd06a7c7823b2494b4eb7e58..e3c090be5897f5805dfaa021fc8b62cda2c828ba 100644
|
| --- a/ash/frame/frame_border_hit_test_controller.cc
|
| +++ b/ash/frame/frame_border_hit_test_controller.cc
|
| @@ -6,18 +6,9 @@
|
|
|
| #include <memory>
|
|
|
| -#include "ash/common/ash_constants.h"
|
| -#include "ash/common/wm/window_state_observer.h"
|
| -#include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
|
| #include "ash/wm/resize_handle_window_targeter.h"
|
| -#include "ui/aura/env.h"
|
| #include "ui/aura/window.h"
|
| -#include "ui/aura/window_observer.h"
|
| -#include "ui/aura/window_targeter.h"
|
| -#include "ui/base/hit_test.h"
|
| #include "ui/views/widget/widget.h"
|
| -#include "ui/views/widget/widget_delegate.h"
|
| -#include "ui/views/window/non_client_view.h"
|
|
|
| namespace ash {
|
|
|
| @@ -29,55 +20,4 @@ FrameBorderHitTestController::FrameBorderHitTestController(views::Widget* frame)
|
|
|
| FrameBorderHitTestController::~FrameBorderHitTestController() {}
|
|
|
| -// static
|
| -int FrameBorderHitTestController::NonClientHitTest(
|
| - views::NonClientFrameView* view,
|
| - FrameCaptionButtonContainerView* caption_button_container,
|
| - const gfx::Point& point_in_widget) {
|
| - gfx::Rect expanded_bounds = view->bounds();
|
| - int outside_bounds = kResizeOutsideBoundsSize;
|
| -
|
| - if (aura::Env::GetInstance()->is_touch_down())
|
| - outside_bounds *= kResizeOutsideBoundsScaleForTouch;
|
| - expanded_bounds.Inset(-outside_bounds, -outside_bounds);
|
| -
|
| - if (!expanded_bounds.Contains(point_in_widget))
|
| - return HTNOWHERE;
|
| -
|
| - // Check the frame first, as we allow a small area overlapping the contents
|
| - // to be used for resize handles.
|
| - views::Widget* frame = view->GetWidget();
|
| - bool can_ever_resize = frame->widget_delegate()->CanResize();
|
| - // Don't allow overlapping resize handles when the window is maximized or
|
| - // fullscreen, as it can't be resized in those states.
|
| - int resize_border = kResizeInsideBoundsSize;
|
| - if (frame->IsMaximized() || frame->IsFullscreen()) {
|
| - resize_border = 0;
|
| - can_ever_resize = false;
|
| - }
|
| - int frame_component = view->GetHTComponentForFrame(
|
| - point_in_widget, resize_border, resize_border, kResizeAreaCornerSize,
|
| - kResizeAreaCornerSize, can_ever_resize);
|
| - if (frame_component != HTNOWHERE)
|
| - return frame_component;
|
| -
|
| - int client_component =
|
| - frame->client_view()->NonClientHitTest(point_in_widget);
|
| - if (client_component != HTNOWHERE)
|
| - return client_component;
|
| -
|
| - if (caption_button_container->visible()) {
|
| - gfx::Point point_in_caption_button_container(point_in_widget);
|
| - views::View::ConvertPointFromWidget(caption_button_container,
|
| - &point_in_caption_button_container);
|
| - int caption_button_component = caption_button_container->NonClientHitTest(
|
| - point_in_caption_button_container);
|
| - if (caption_button_component != HTNOWHERE)
|
| - return caption_button_component;
|
| - }
|
| -
|
| - // Caption is a safe default.
|
| - return HTCAPTION;
|
| -}
|
| -
|
| } // namespace ash
|
|
|