#ifndef ASH_WM_DRAG_WINDOW_CONTROLLER_H_
#define ASH_WM_DRAG_WINDOW_CONTROLLER_H_
#include <memory>
#include <vector>
#include "ash/ash_export.h"
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
namespace aura {
class Window;
}
namespace ui {
class Shadow;
}
namespace ash {
class ASH_EXPORT DragWindowController {
public:
DragWindowController(aura::Window* window,
bool is_touch_dragging,
bool create_window_shadow);
DragWindowController(const DragWindowController&) = delete;
DragWindowController& operator=(const DragWindowController&) = delete;
virtual ~DragWindowController();
void Update();
float old_opacity_for_testing() const { return old_opacity_; }
private:
class DragWindowDetails;
FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, DragWindowController);
FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest,
DragWindowControllerAcrossThreeDisplays);
int GetDragWindowsCountForTest() const;
const aura::Window* GetDragWindowForTest(size_t index) const;
const ui::Shadow* GetDragWindowShadowForTest(size_t index) const;
void RequestLayerPaintForTest();
raw_ptr<aura::Window> window_;
const bool is_touch_dragging_;
const bool create_window_shadow_;
const float old_opacity_;
std::vector<std::unique_ptr<DragWindowDetails>> drag_windows_;
};
}
#endif