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

Unified Diff: ash/common/wm/panels/panel_window_resizer.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 10 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/wm/panels/panel_layout_manager.cc ('k') | ash/common/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/panels/panel_window_resizer.h
diff --git a/ash/common/wm/panels/panel_window_resizer.h b/ash/common/wm/panels/panel_window_resizer.h
deleted file mode 100644
index dd8deed59175d959bcc986621317421981aa3c23..0000000000000000000000000000000000000000
--- a/ash/common/wm/panels/panel_window_resizer.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef ASH_COMMON_WM_PANELS_PANEL_WINDOW_RESIZER_H_
-#define ASH_COMMON_WM_PANELS_PANEL_WINDOW_RESIZER_H_
-
-#include <memory>
-
-#include "ash/ash_export.h"
-#include "ash/common/wm/window_resizer.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-
-namespace gfx {
-class Rect;
-class Point;
-}
-
-namespace ash {
-
-// PanelWindowResizer is used by ToplevelWindowEventFilter to handle dragging,
-// moving or resizing panel window. These can be attached and detached from the
-// launcher.
-class ASH_EXPORT PanelWindowResizer : public WindowResizer {
- public:
- ~PanelWindowResizer() override;
-
- // Creates a new PanelWindowResizer. The caller takes ownership of the
- // returned object. The ownership of |next_window_resizer| is taken by the
- // returned object. Returns NULL if not resizable.
- static PanelWindowResizer* Create(WindowResizer* next_window_resizer,
- wm::WindowState* window_state);
-
- // WindowResizer:
- void Drag(const gfx::Point& location, int event_flags) override;
- void CompleteDrag() override;
- void RevertDrag() override;
-
- private:
- // Creates PanelWindowResizer that adds the ability to attach / detach panel
- // windows as well as reparenting them to the panel layer while dragging to
- // |next_window_resizer|. This object takes ownership of
- // |next_window_resizer|.
- PanelWindowResizer(WindowResizer* next_window_resizer,
- wm::WindowState* window_state);
-
- // Checks if the provided window bounds should attach to the launcher. If true
- // the offset gives the necessary adjustment to snap to the launcher.
- bool AttachToLauncher(const gfx::Rect& bounds, gfx::Point* offset);
-
- // Tracks the panel's initial position and attachment at the start of a drag
- // and informs the PanelLayoutManager that a drag has started if necessary.
- void StartedDragging();
-
- // Informs the PanelLayoutManager that the drag is complete if it was informed
- // of the drag start.
- void FinishDragging();
-
- // Updates the dragged panel's index in the launcher.
- void UpdateLauncherPosition();
-
- // Last pointer location in screen coordinates.
- gfx::Point last_location_;
-
- // Wraps a window resizer and adds panel detaching / reattaching and snapping
- // to launcher behavior during drags.
- std::unique_ptr<WindowResizer> next_window_resizer_;
-
- // Panel container window.
- WmWindow* panel_container_;
- WmWindow* initial_panel_container_;
-
- // Set to true once Drag() is invoked and the bounds of the window change.
- bool did_move_or_resize_;
-
- // True if the window started attached to the launcher.
- const bool was_attached_;
-
- base::WeakPtrFactory<PanelWindowResizer> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer);
-};
-
-} // namespace ash
-
-#endif // ASH_COMMON_WM_PANELS_PANEL_WINDOW_RESIZER_H_
« no previous file with comments | « ash/common/wm/panels/panel_layout_manager.cc ('k') | ash/common/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698