Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: ash/common/frame/frame_border_hit_test.cc

Issue 2215223003: Moves most frame related classes to ash/common/frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/frame/frame_border_hit_test.h ('k') | ash/common/frame/header_painter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/frame/frame_border_hit_test.cc
diff --git a/ash/frame/frame_border_hit_test_controller.cc b/ash/common/frame/frame_border_hit_test.cc
similarity index 71%
copy from ash/frame/frame_border_hit_test_controller.cc
copy to ash/common/frame/frame_border_hit_test.cc
index ab254a3ba2b50cb6fd06a7c7823b2494b4eb7e58..3f0116a13098c0441386aaf893b906a4f6fb6d54 100644
--- a/ash/frame/frame_border_hit_test_controller.cc
+++ b/ash/common/frame/frame_border_hit_test.cc
@@ -1,19 +1,12 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/frame/frame_border_hit_test_controller.h"
-
-#include <memory>
+#include "ash/common/frame/frame_border_hit_test.h"
#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 "ash/common/frame/caption_buttons/frame_caption_button_container_view.h"
+#include "ash/common/wm_shell.h"
#include "ui/base/hit_test.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
@@ -21,23 +14,14 @@
namespace ash {
-FrameBorderHitTestController::FrameBorderHitTestController(views::Widget* frame)
- : frame_window_(frame->GetNativeWindow()) {
- frame_window_->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
- new ResizeHandleWindowTargeter(frame_window_, NULL)));
-}
-
-FrameBorderHitTestController::~FrameBorderHitTestController() {}
-
-// static
-int FrameBorderHitTestController::NonClientHitTest(
+int FrameBorderNonClientHitTest(
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())
+ if (WmShell::Get()->IsTouchDown())
outside_bounds *= kResizeOutsideBoundsScaleForTouch;
expanded_bounds.Inset(-outside_bounds, -outside_bounds);
« no previous file with comments | « ash/common/frame/frame_border_hit_test.h ('k') | ash/common/frame/header_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698