Commit bd59c164 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

part 4 of the arrow button implementation

This CL is the forth part of code to implement the arrow button in
the overflow bubble view.
See more details from the below doc link:
https://docs.google.com/document/d/1dO4H_4T6ttWFc75nCNi2Uh18k-3_M8-eOHcfMTcNwd0/edit?usp=sharing

Bug: 918024
Change-Id: I2ee940845c61a52e1250487c8dce1e942759adb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703268
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarMitsuru Oshima (Slow - traveling) <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683031}
parent ae360e2d
This diff is collapsed.
......@@ -23,7 +23,7 @@ class ASH_EXPORT OverflowBubbleView : public ShelfBubble,
enum LayoutStrategy {
// The arrow buttons are not shown. It means that there is enough space to
// accommodate all of shelf icons.
NOT_SHOW_ARROW_BUTTON,
NOT_SHOW_ARROW_BUTTONS,
// Only the left arrow button is shown.
SHOW_LEFT_ARROW_BUTTON,
......@@ -52,6 +52,9 @@ class ASH_EXPORT OverflowBubbleView : public ShelfBubble,
int ScrollByXOffset(float x_offset, bool animating);
int ScrollByYOffset(float y_offset, bool animating);
int GetFirstVisibleIndexForTest() const;
int GetLastVisibleIndexForTest() const;
// views::BubbleDialogDelegateView:
gfx::Rect GetBubbleBounds() override;
bool CanActivate() const override;
......@@ -74,6 +77,8 @@ class ASH_EXPORT OverflowBubbleView : public ShelfBubble,
// Minimum margin around the bubble so that it doesn't hug the screen edges.
static constexpr int kMinimumMargin = 8;
static constexpr int kFadingZone = 16;
private:
friend class OverflowBubbleViewTestAPI;
......
This diff is collapsed.
......@@ -509,12 +509,12 @@ void AshTestBase::SwapPrimaryDisplay() {
display_manager()->GetSecondaryDisplay().id());
}
display::Display AshTestBase::GetPrimaryDisplay() {
display::Display AshTestBase::GetPrimaryDisplay() const {
return display::Screen::GetScreen()->GetDisplayNearestWindow(
Shell::GetPrimaryRootWindow());
}
display::Display AshTestBase::GetSecondaryDisplay() {
display::Display AshTestBase::GetSecondaryDisplay() const {
return ash_test_helper_.GetSecondaryDisplay();
}
......
......@@ -258,8 +258,8 @@ class AshTestBase : public testing::Test {
// Swap the primary display with the secondary.
void SwapPrimaryDisplay();
display::Display GetPrimaryDisplay();
display::Display GetSecondaryDisplay();
display::Display GetPrimaryDisplay() const;
display::Display GetSecondaryDisplay() const;
private:
void CreateWindowTreeIfNecessary();
......
......@@ -299,7 +299,7 @@ aura::Window* AshTestHelper::CurrentContext() {
return root_window;
}
display::Display AshTestHelper::GetSecondaryDisplay() {
display::Display AshTestHelper::GetSecondaryDisplay() const {
return Shell::Get()->display_manager()->GetSecondaryDisplay();
}
......
......@@ -105,7 +105,7 @@ class AshTestHelper {
return test_views_delegate_.get();
}
display::Display GetSecondaryDisplay();
display::Display GetSecondaryDisplay() const;
TestSessionControllerClient* test_session_controller_client() {
return session_controller_client_.get();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment