Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ash: Clean up classic-view tablet tab dragging feature - part 4
In this CL: - TabletModeBrowserWindowDragSessionWindowsHider is moved from ash/wm/tablet_mode to ash/drag_drop and renamed to TabDragDropWindowsHider since it's now only used by the webui tab drag code. - Clean up the unused parameter of DropTargetView - Remove the unused vector icon Bug: b/270442617 Change-Id: Idf0a0607aadca17ba749eab78c6d4e86f5f70783 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4288655 Commit-Queue: Xiaoqian Dai <xdai@chromium.org> Reviewed-by: Sammie Quon <sammiequon@chromium.org> Cr-Commit-Position: refs/heads/main@{#1118857}
- Loading branch information
Xiaoqian Dai
authored and
Chromium LUCI CQ
committed
Mar 17, 2023
1 parent
5092586
commit ce2f784
Showing
12 changed files
with
122 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2020 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef ASH_DRAG_DROP_TAB_DRAG_DROP_WINDOWS_HIDER_H_ | ||
#define ASH_DRAG_DROP_TAB_DRAG_DROP_WINDOWS_HIDER_H_ | ||
|
||
#include <map> | ||
|
||
#include "ash/ash_export.h" | ||
#include "ui/aura/window.h" | ||
#include "ui/aura/window_observer.h" | ||
|
||
namespace ash { | ||
|
||
// Hides all visible windows except the source window from which the webui tab | ||
// drag originates, and restores the windows' visibility upon its destruction. | ||
// It also blurs and darkens the background, hides the home launcher if home | ||
// launcher is enabled. Only need to do so if we need to scale up and down the | ||
// source window when dragging a web ui tab out of it. | ||
class ASH_EXPORT TabDragDropWindowsHider : public aura::WindowObserver { | ||
public: | ||
explicit TabDragDropWindowsHider(aura::Window* source_window); | ||
|
||
TabDragDropWindowsHider(const TabDragDropWindowsHider&) = delete; | ||
TabDragDropWindowsHider& operator=(const TabDragDropWindowsHider&) = delete; | ||
|
||
~TabDragDropWindowsHider() override; | ||
|
||
// aura::WindowObserver: | ||
void OnWindowDestroying(aura::Window* window) override; | ||
void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; | ||
|
||
int GetWindowVisibilityMapSizeForTesting() const; | ||
|
||
private: | ||
// The window from which the drag originated. | ||
aura::Window* source_window_; | ||
|
||
// The root window the drag is taking place within. Guaranteed to be | ||
// non-null during the lifetime of |this|. | ||
aura::Window* root_window_; | ||
|
||
// Maintains the map between windows and their visibilities. All windows | ||
// except the dragged window and the source window should stay hidden during | ||
// dragging. | ||
std::map<aura::Window*, bool> window_visibility_map_; | ||
}; | ||
|
||
} // namespace ash | ||
|
||
#endif // ASH_DRAG_DROP_TAB_DRAG_DROP_WINDOWS_HIDER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.