Commit 817b6c7d authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS App list: Remove some unnecessary ash:: prefixes.

This is a pure renaming change with no expected visible effect.

Change-Id: I93c5e546cc194a0be3251ddc91acf0cb1e283744
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1954799Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723018}
parent 78a02050
This diff is collapsed.
...@@ -52,14 +52,14 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -52,14 +52,14 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
public SessionObserver, public SessionObserver,
public AppListModelObserver, public AppListModelObserver,
public AppListViewDelegate, public AppListViewDelegate,
public ash::ShellObserver, public ShellObserver,
public OverviewObserver, public OverviewObserver,
public TabletModeObserver, public TabletModeObserver,
public KeyboardControllerObserver, public KeyboardControllerObserver,
public WallpaperControllerObserver, public WallpaperControllerObserver,
public AssistantStateObserver, public AssistantStateObserver,
public WindowTreeHostManager::Observer, public WindowTreeHostManager::Observer,
public ash::MruWindowTracker::Observer, public MruWindowTracker::Observer,
public AssistantControllerObserver, public AssistantControllerObserver,
public AssistantUiModelObserver, public AssistantUiModelObserver,
public HomeScreenDelegate { public HomeScreenDelegate {
...@@ -80,15 +80,15 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -80,15 +80,15 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
// AppListController: // AppListController:
void SetClient(AppListClient* client) override; void SetClient(AppListClient* client) override;
AppListClient* GetClient() override; AppListClient* GetClient() override;
void AddItem(std::unique_ptr<ash::AppListItemMetadata> app_item) override; void AddItem(std::unique_ptr<AppListItemMetadata> app_item) override;
void AddItemToFolder(std::unique_ptr<ash::AppListItemMetadata> app_item, void AddItemToFolder(std::unique_ptr<AppListItemMetadata> app_item,
const std::string& folder_id) override; const std::string& folder_id) override;
void RemoveItem(const std::string& id) override; void RemoveItem(const std::string& id) override;
void RemoveUninstalledItem(const std::string& id) override; void RemoveUninstalledItem(const std::string& id) override;
void MoveItemToFolder(const std::string& id, void MoveItemToFolder(const std::string& id,
const std::string& folder_id) override; const std::string& folder_id) override;
void SetStatus(ash::AppListModelStatus status) override; void SetStatus(AppListModelStatus status) override;
void SetState(ash::AppListState state) override; void SetState(AppListState state) override;
void HighlightItemInstalledFromUI(const std::string& id) override; void HighlightItemInstalledFromUI(const std::string& id) override;
void SetSearchEngineIsGoogle(bool is_google) override; void SetSearchEngineIsGoogle(bool is_google) override;
void SetSearchTabletAndClamshellAccessibleName( void SetSearchTabletAndClamshellAccessibleName(
...@@ -98,19 +98,19 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -98,19 +98,19 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
void UpdateSearchBox(const base::string16& text, void UpdateSearchBox(const base::string16& text,
bool initiated_by_user) override; bool initiated_by_user) override;
void PublishSearchResults( void PublishSearchResults(
std::vector<std::unique_ptr<ash::SearchResultMetadata>> results) override; std::vector<std::unique_ptr<SearchResultMetadata>> results) override;
void SetItemMetadata(const std::string& id, void SetItemMetadata(const std::string& id,
std::unique_ptr<ash::AppListItemMetadata> data) override; std::unique_ptr<AppListItemMetadata> data) override;
void SetItemIcon(const std::string& id, const gfx::ImageSkia& icon) override; void SetItemIcon(const std::string& id, const gfx::ImageSkia& icon) override;
void SetItemIsInstalling(const std::string& id, bool is_installing) override; void SetItemIsInstalling(const std::string& id, bool is_installing) override;
void SetItemPercentDownloaded(const std::string& id, void SetItemPercentDownloaded(const std::string& id,
int32_t percent_downloaded) override; int32_t percent_downloaded) override;
void SetModelData(int profile_id, void SetModelData(int profile_id,
std::vector<std::unique_ptr<ash::AppListItemMetadata>> apps, std::vector<std::unique_ptr<AppListItemMetadata>> apps,
bool is_search_engine_google) override; bool is_search_engine_google) override;
void SetSearchResultMetadata( void SetSearchResultMetadata(
std::unique_ptr<ash::SearchResultMetadata> metadata) override; std::unique_ptr<SearchResultMetadata> metadata) override;
void SetSearchResultIsInstalling(const std::string& id, void SetSearchResultIsInstalling(const std::string& id,
bool is_installing) override; bool is_installing) override;
void SetSearchResultPercentDownloaded(const std::string& id, void SetSearchResultPercentDownloaded(const std::string& id,
...@@ -135,8 +135,8 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -135,8 +135,8 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
void OnAppListItemAdded(AppListItem* item) override; void OnAppListItemAdded(AppListItem* item) override;
void OnAppListItemWillBeDeleted(AppListItem* item) override; void OnAppListItemWillBeDeleted(AppListItem* item) override;
void OnAppListItemUpdated(AppListItem* item) override; void OnAppListItemUpdated(AppListItem* item) override;
void OnAppListStateChanged(ash::AppListState new_state, void OnAppListStateChanged(AppListState new_state,
ash::AppListState old_state) override; AppListState old_state) override;
// SessionObserver: // SessionObserver:
void OnActiveUserPrefServiceChanged(PrefService* pref_service) override; void OnActiveUserPrefServiceChanged(PrefService* pref_service) override;
...@@ -148,12 +148,12 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -148,12 +148,12 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
base::TimeTicks event_time_stamp); base::TimeTicks event_time_stamp);
void UpdateYPositionAndOpacity(int y_position_in_screen, void UpdateYPositionAndOpacity(int y_position_in_screen,
float background_opacity); float background_opacity);
void EndDragFromShelf(ash::AppListViewState app_list_state); void EndDragFromShelf(AppListViewState app_list_state);
void ProcessMouseWheelEvent(const ui::MouseWheelEvent& event); void ProcessMouseWheelEvent(const ui::MouseWheelEvent& event);
ash::ShelfAction ToggleAppList(int64_t display_id, ShelfAction ToggleAppList(int64_t display_id,
AppListShowSource show_source, AppListShowSource show_source,
base::TimeTicks event_time_stamp); base::TimeTicks event_time_stamp);
ash::AppListViewState GetAppListViewState(); AppListViewState GetAppListViewState();
// Returns whether the home launcher should be visible. // Returns whether the home launcher should be visible.
bool ShouldHomeLauncherBeVisible() const; bool ShouldHomeLauncherBeVisible() const;
...@@ -189,7 +189,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -189,7 +189,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
void GetContextMenuModel(const std::string& id, void GetContextMenuModel(const std::string& id,
GetContextMenuModelCallback callback) override; GetContextMenuModelCallback callback) override;
ui::ImplicitAnimationObserver* GetAnimationObserver( ui::ImplicitAnimationObserver* GetAnimationObserver(
ash::AppListViewState target_state) override; AppListViewState target_state) override;
void ShowWallpaperContextMenu(const gfx::Point& onscreen_location, void ShowWallpaperContextMenu(const gfx::Point& onscreen_location,
ui::MenuSourceType source_type) override; ui::MenuSourceType source_type) override;
bool ProcessHomeLauncherGesture(ui::GestureEvent* event) override; bool ProcessHomeLauncherGesture(ui::GestureEvent* event) override;
...@@ -200,19 +200,18 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -200,19 +200,18 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
mojo::PendingReceiver<content::mojom::NavigableContentsFactory> receiver) mojo::PendingReceiver<content::mojom::NavigableContentsFactory> receiver)
override; override;
int GetTargetYForAppListHide(aura::Window* root_window) override; int GetTargetYForAppListHide(aura::Window* root_window) override;
ash::AssistantViewDelegate* GetAssistantViewDelegate() override; AssistantViewDelegate* GetAssistantViewDelegate() override;
void OnSearchResultVisibilityChanged(const std::string& id, void OnSearchResultVisibilityChanged(const std::string& id,
bool visibility) override; bool visibility) override;
void NotifySearchResultsForLogging( void NotifySearchResultsForLogging(
const base::string16& raw_query, const base::string16& raw_query,
const ash::SearchResultIdWithPositionIndices& results, const SearchResultIdWithPositionIndices& results,
int position_index) override; int position_index) override;
bool IsAssistantAllowedAndEnabled() const override; bool IsAssistantAllowedAndEnabled() const override;
bool ShouldShowAssistantPrivacyInfo() const override; bool ShouldShowAssistantPrivacyInfo() const override;
void MaybeIncreaseAssistantPrivacyInfoShownCount() override; void MaybeIncreaseAssistantPrivacyInfoShownCount() override;
void MarkAssistantPrivacyInfoDismissed() override; void MarkAssistantPrivacyInfoDismissed() override;
void OnStateTransitionAnimationCompleted( void OnStateTransitionAnimationCompleted(AppListViewState state) override;
ash::AppListViewState state) override;
void GetAppLaunchedMetricParams( void GetAppLaunchedMetricParams(
AppLaunchedMetricParams* metric_params) override; AppLaunchedMetricParams* metric_params) override;
gfx::Rect SnapBoundsToDisplayEdge(const gfx::Rect& bounds) override; gfx::Rect SnapBoundsToDisplayEdge(const gfx::Rect& bounds) override;
...@@ -304,7 +303,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -304,7 +303,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
// |display_id| is the id of display where app list should toggle. // |display_id| is the id of display where app list should toggle.
// |show_source| is the source of the event. |event_time_stamp| records the // |show_source| is the source of the event. |event_time_stamp| records the
// event timestamp. // event timestamp.
ash::ShelfAction OnHomeButtonPressed(int64_t display_id, ShelfAction OnHomeButtonPressed(int64_t display_id,
AppListShowSource show_source, AppListShowSource show_source,
base::TimeTicks event_time_stamp); base::TimeTicks event_time_stamp);
...@@ -312,14 +311,14 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -312,14 +311,14 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
bool IsShowingEmbeddedAssistantUI() const; bool IsShowingEmbeddedAssistantUI() const;
// Get updated app list view state after dragging from shelf. // Get updated app list view state after dragging from shelf.
ash::AppListViewState CalculateStateAfterShelfDrag( AppListViewState CalculateStateAfterShelfDrag(
const ui::LocatedEvent& event_in_screen, const ui::LocatedEvent& event_in_screen,
float launcher_above_shelf_bottom_amount) const; float launcher_above_shelf_bottom_amount) const;
void SetAppListModelForTest(std::unique_ptr<AppListModel> model); void SetAppListModelForTest(std::unique_ptr<AppListModel> model);
using StateTransitionAnimationCallback = using StateTransitionAnimationCallback =
base::RepeatingCallback<void(ash::AppListViewState)>; base::RepeatingCallback<void(AppListViewState)>;
void SetStateTransitionAnimationCallbackForTesting( void SetStateTransitionAnimationCallbackForTesting(
StateTransitionAnimationCallback callback); StateTransitionAnimationCallback callback);
...@@ -355,7 +354,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController, ...@@ -355,7 +354,7 @@ class ASH_EXPORT AppListControllerImpl : public AppListController,
syncer::StringOrdinal GetOemFolderPos(); syncer::StringOrdinal GetOemFolderPos();
std::unique_ptr<AppListItem> CreateAppListItem( std::unique_ptr<AppListItem> CreateAppListItem(
std::unique_ptr<ash::AppListItemMetadata> metadata); std::unique_ptr<AppListItemMetadata> metadata);
AppListFolderItem* FindFolderItem(const std::string& folder_id); AppListFolderItem* FindFolderItem(const std::string& folder_id);
// Update the visibility of Assistant functionality. // Update the visibility of Assistant functionality.
......
...@@ -141,9 +141,9 @@ TEST_F(AppListControllerImplTest, AppListHiddenWhenShelfAlignmentChanges) { ...@@ -141,9 +141,9 @@ TEST_F(AppListControllerImplTest, AppListHiddenWhenShelfAlignmentChanges) {
Shelf* const shelf = AshTestBase::GetPrimaryShelf(); Shelf* const shelf = AshTestBase::GetPrimaryShelf();
shelf->SetAlignment(ShelfAlignment::kBottom); shelf->SetAlignment(ShelfAlignment::kBottom);
const std::vector<ash::ShelfAlignment> alignments( const std::vector<ShelfAlignment> alignments(
{ShelfAlignment::kLeft, ShelfAlignment::kRight, ShelfAlignment::kBottom}); {ShelfAlignment::kLeft, ShelfAlignment::kRight, ShelfAlignment::kBottom});
for (ash::ShelfAlignment alignment : alignments) { for (ShelfAlignment alignment : alignments) {
ShowAppListNow(); ShowAppListNow();
EXPECT_TRUE(Shell::Get() EXPECT_TRUE(Shell::Get()
->app_list_controller() ->app_list_controller()
...@@ -209,7 +209,7 @@ TEST_F(AppListControllerImplTest, HideRoundingCorners) { ...@@ -209,7 +209,7 @@ TEST_F(AppListControllerImplTest, HideRoundingCorners) {
aura::Window* native_window = GetAppListView()->GetWidget()->GetNativeView(); aura::Window* native_window = GetAppListView()->GetWidget()->GetNativeView();
gfx::Rect app_list_screen_bounds = native_window->GetBoundsInScreen(); gfx::Rect app_list_screen_bounds = native_window->GetBoundsInScreen();
EXPECT_EQ(0, app_list_screen_bounds.y()); EXPECT_EQ(0, app_list_screen_bounds.y());
EXPECT_EQ(ash::AppListViewState::kHalf, GetAppListView()->app_list_state()); EXPECT_EQ(AppListViewState::kHalf, GetAppListView()->app_list_state());
gfx::Transform expected_transform; gfx::Transform expected_transform;
expected_transform.Translate(0, -(ShelfConfig::Get()->shelf_size() / 2)); expected_transform.Translate(0, -(ShelfConfig::Get()->shelf_size() / 2));
EXPECT_EQ( EXPECT_EQ(
...@@ -337,11 +337,10 @@ TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenVKeyboardEnabled) { ...@@ -337,11 +337,10 @@ TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenVKeyboardEnabled) {
// the PEEKING state. // the PEEKING state.
ShowAppListNow(); ShowAppListNow();
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
EXPECT_EQ(ash::AppListViewState::kPeeking, EXPECT_EQ(AppListViewState::kPeeking, GetAppListView()->app_list_state());
GetAppListView()->app_list_state());
EXPECT_EQ(nullptr, GetVirtualKeyboardWindow()); EXPECT_EQ(nullptr, GetVirtualKeyboardWindow());
EXPECT_EQ(GetAppListView()->GetPreferredWidgetBoundsForState( EXPECT_EQ(GetAppListView()->GetPreferredWidgetBoundsForState(
ash::AppListViewState::kPeeking), AppListViewState::kPeeking),
GetAppListViewNativeWindow()->bounds()); GetAppListViewNativeWindow()->bounds());
} }
...@@ -359,7 +358,7 @@ TEST_F(AppListControllerImplTest, ...@@ -359,7 +358,7 @@ TEST_F(AppListControllerImplTest,
ShowAppListNow(); ShowAppListNow();
GetSearchBoxView()->SetSearchBoxActive(true, ui::ET_MOUSE_PRESSED); GetSearchBoxView()->SetSearchBoxActive(true, ui::ET_MOUSE_PRESSED);
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
EXPECT_EQ(ash::AppListViewState::kHalf, GetAppListView()->app_list_state()); EXPECT_EQ(AppListViewState::kHalf, GetAppListView()->app_list_state());
EXPECT_TRUE(GetVirtualKeyboardWindow()->IsVisible()); EXPECT_TRUE(GetVirtualKeyboardWindow()->IsVisible());
EXPECT_EQ(0, GetAppListView()->GetBoundsInScreen().y()); EXPECT_EQ(0, GetAppListView()->GetBoundsInScreen().y());
...@@ -368,7 +367,7 @@ TEST_F(AppListControllerImplTest, ...@@ -368,7 +367,7 @@ TEST_F(AppListControllerImplTest,
// remain at the top of the screen. // remain at the top of the screen.
GetAppListView()->SetState(AppListViewState::kHalf); GetAppListView()->SetState(AppListViewState::kHalf);
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
EXPECT_EQ(ash::AppListViewState::kHalf, GetAppListView()->app_list_state()); EXPECT_EQ(AppListViewState::kHalf, GetAppListView()->app_list_state());
EXPECT_EQ(0, GetAppListView()->GetBoundsInScreen().y()); EXPECT_EQ(0, GetAppListView()->GetBoundsInScreen().y());
...@@ -378,7 +377,7 @@ TEST_F(AppListControllerImplTest, ...@@ -378,7 +377,7 @@ TEST_F(AppListControllerImplTest,
EXPECT_EQ(nullptr, GetVirtualKeyboardWindow()); EXPECT_EQ(nullptr, GetVirtualKeyboardWindow());
// Verify the app list bounds have been updated to match kHalf state. // Verify the app list bounds have been updated to match kHalf state.
EXPECT_EQ(ash::AppListViewState::kHalf, GetAppListView()->app_list_state()); EXPECT_EQ(AppListViewState::kHalf, GetAppListView()->app_list_state());
const gfx::Rect shelf_bounds = const gfx::Rect shelf_bounds =
AshTestBase::GetPrimaryShelf()->shelf_widget()->GetWindowBoundsInScreen(); AshTestBase::GetPrimaryShelf()->shelf_widget()->GetWindowBoundsInScreen();
EXPECT_EQ(shelf_bounds.bottom() - 545 /*half app list height*/, EXPECT_EQ(shelf_bounds.bottom() - 545 /*half app list height*/,
...@@ -412,10 +411,10 @@ TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenDismissVKeyboard) { ...@@ -412,10 +411,10 @@ TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenDismissVKeyboard) {
// (1) AppListView's state is FULLSCREEN_SEARCH // (1) AppListView's state is FULLSCREEN_SEARCH
// (2) AppListView's bounds are the same as the preferred bounds for // (2) AppListView's bounds are the same as the preferred bounds for
// the FULLSCREEN_SEARCH state. // the FULLSCREEN_SEARCH state.
EXPECT_EQ(ash::AppListViewState::kFullscreenSearch, EXPECT_EQ(AppListViewState::kFullscreenSearch,
GetAppListView()->app_list_state()); GetAppListView()->app_list_state());
EXPECT_EQ(GetAppListView()->GetPreferredWidgetBoundsForState( EXPECT_EQ(GetAppListView()->GetPreferredWidgetBoundsForState(
ash::AppListViewState::kFullscreenSearch), AppListViewState::kFullscreenSearch),
GetAppListViewNativeWindow()->bounds()); GetAppListViewNativeWindow()->bounds());
} }
...@@ -470,8 +469,7 @@ TEST_F(AppListControllerImplTest, ...@@ -470,8 +469,7 @@ TEST_F(AppListControllerImplTest,
constexpr int tapping_height = 72; constexpr int tapping_height = 72;
ShowAppListNow(); ShowAppListNow();
ASSERT_EQ(ash::AppListViewState::kPeeking, ASSERT_EQ(AppListViewState::kPeeking, GetAppListView()->app_list_state());
GetAppListView()->app_list_state());
// Get in screen bounds of arrow // Get in screen bounds of arrow
gfx::Rect expand_arrow = GetAppListView() gfx::Rect expand_arrow = GetAppListView()
...@@ -486,7 +484,7 @@ TEST_F(AppListControllerImplTest, ...@@ -486,7 +484,7 @@ TEST_F(AppListControllerImplTest,
// Tap expand arrow icon and check that full screen apps view is entered. // Tap expand arrow icon and check that full screen apps view is entered.
ui::test::EventGenerator* event_generator = GetEventGenerator(); ui::test::EventGenerator* event_generator = GetEventGenerator();
event_generator->GestureTapAt(expand_arrow.CenterPoint()); event_generator->GestureTapAt(expand_arrow.CenterPoint());
ASSERT_EQ(ash::AppListViewState::kFullscreenAllApps, ASSERT_EQ(AppListViewState::kFullscreenAllApps,
GetAppListView()->app_list_state()); GetAppListView()->app_list_state());
// Hide the AppListView. Wait until animation is finished // Hide the AppListView. Wait until animation is finished
...@@ -497,13 +495,12 @@ TEST_F(AppListControllerImplTest, ...@@ -497,13 +495,12 @@ TEST_F(AppListControllerImplTest,
// tap target for the expand arrow icon still brings up full app list // tap target for the expand arrow icon still brings up full app list
// view. // view.
ShowAppListNow(); ShowAppListNow();
ASSERT_EQ(ash::AppListViewState::kPeeking, ASSERT_EQ(AppListViewState::kPeeking, GetAppListView()->app_list_state());
GetAppListView()->app_list_state());
event_generator->GestureTapAt(gfx::Point(expand_arrow.top_right().x() - 1, event_generator->GestureTapAt(gfx::Point(expand_arrow.top_right().x() - 1,
expand_arrow.top_right().y() + 1)); expand_arrow.top_right().y() + 1));
ASSERT_EQ(ash::AppListViewState::kFullscreenAllApps, ASSERT_EQ(AppListViewState::kFullscreenAllApps,
GetAppListView()->app_list_state()); GetAppListView()->app_list_state());
} }
...@@ -657,8 +654,7 @@ TEST_P(HotseatAppListControllerImplTest, GetItemBoundsForWindow) { ...@@ -657,8 +654,7 @@ TEST_P(HotseatAppListControllerImplTest, GetItemBoundsForWindow) {
<< "} with selected page " << selected_page); << "} with selected page " << selected_page);
std::unique_ptr<aura::Window> window(CreateTestWindow()); std::unique_ptr<aura::Window> window(CreateTestWindow());
window->SetProperty(ash::kAppIDKey, window->SetProperty(kAppIDKey, new std::string(test_case.window_app_id));
new std::string(test_case.window_app_id));
const gfx::Rect item_bounds = const gfx::Rect item_bounds =
home_screen_delegate->GetInitialAppListItemScreenBoundsForWindow( home_screen_delegate->GetInitialAppListItemScreenBoundsForWindow(
...@@ -837,13 +833,12 @@ class AppListControllerImplMetricsTest : public AshTestBase { ...@@ -837,13 +833,12 @@ class AppListControllerImplMetricsTest : public AshTestBase {
void SetUp() override { void SetUp() override {
AshTestBase::SetUp(); AshTestBase::SetUp();
controller_ = ash::Shell::Get()->app_list_controller(); controller_ = Shell::Get()->app_list_controller();
ash::PresentationTimeRecorder::SetReportPresentationTimeImmediatelyForTest( PresentationTimeRecorder::SetReportPresentationTimeImmediatelyForTest(true);
true);
} }
void TearDown() override { void TearDown() override {
ash::PresentationTimeRecorder::SetReportPresentationTimeImmediatelyForTest( PresentationTimeRecorder::SetReportPresentationTimeImmediatelyForTest(
false); false);
AshTestBase::TearDown(); AshTestBase::TearDown();
} }
......
...@@ -165,7 +165,7 @@ aura::Window* AppListPresenterDelegateImpl::GetContainerForWindow( ...@@ -165,7 +165,7 @@ aura::Window* AppListPresenterDelegateImpl::GetContainerForWindow(
aura::Window* AppListPresenterDelegateImpl::GetRootWindowForDisplayId( aura::Window* AppListPresenterDelegateImpl::GetRootWindowForDisplayId(
int64_t display_id) { int64_t display_id) {
return ash::Shell::Get()->GetRootWindowForDisplayId(display_id); return Shell::Get()->GetRootWindowForDisplayId(display_id);
} }
void AppListPresenterDelegateImpl::OnVisibilityChanged(bool visible, void AppListPresenterDelegateImpl::OnVisibilityChanged(bool visible,
......
...@@ -164,7 +164,7 @@ void AppListPresenterImpl::Dismiss(base::TimeTicks event_time_stamp) { ...@@ -164,7 +164,7 @@ void AppListPresenterImpl::Dismiss(base::TimeTicks event_time_stamp) {
delegate_->OnClosing(); delegate_->OnClosing();
OnVisibilityWillChange(GetTargetVisibility(), GetDisplayId()); OnVisibilityWillChange(GetTargetVisibility(), GetDisplayId());
view_->SetState(ash::AppListViewState::kClosed); view_->SetState(AppListViewState::kClosed);
base::RecordAction(base::UserMetricsAction("Launcher_Dismiss")); base::RecordAction(base::UserMetricsAction("Launcher_Dismiss"));
} }
...@@ -172,7 +172,7 @@ bool AppListPresenterImpl::HandleCloseOpenFolder() { ...@@ -172,7 +172,7 @@ bool AppListPresenterImpl::HandleCloseOpenFolder() {
return is_target_visibility_show_ && view_ && view_->HandleCloseOpenFolder(); return is_target_visibility_show_ && view_ && view_->HandleCloseOpenFolder();
} }
ash::ShelfAction AppListPresenterImpl::ToggleAppList( ShelfAction AppListPresenterImpl::ToggleAppList(
int64_t display_id, int64_t display_id,
AppListShowSource show_source, AppListShowSource show_source,
base::TimeTicks event_time_stamp) { base::TimeTicks event_time_stamp) {
...@@ -182,21 +182,21 @@ ash::ShelfAction AppListPresenterImpl::ToggleAppList( ...@@ -182,21 +182,21 @@ ash::ShelfAction AppListPresenterImpl::ToggleAppList(
// animation can be reversed. // animation can be reversed.
if (is_target_visibility_show_) { if (is_target_visibility_show_) {
if (request_fullscreen) { if (request_fullscreen) {
if (view_->app_list_state() == ash::AppListViewState::kPeeking) { if (view_->app_list_state() == AppListViewState::kPeeking) {
view_->SetState(ash::AppListViewState::kFullscreenAllApps); view_->SetState(AppListViewState::kFullscreenAllApps);
return ash::SHELF_ACTION_APP_LIST_SHOWN; return SHELF_ACTION_APP_LIST_SHOWN;
} else if (view_->app_list_state() == ash::AppListViewState::kHalf) { } else if (view_->app_list_state() == AppListViewState::kHalf) {
view_->SetState(ash::AppListViewState::kFullscreenSearch); view_->SetState(AppListViewState::kFullscreenSearch);
return ash::SHELF_ACTION_APP_LIST_SHOWN; return SHELF_ACTION_APP_LIST_SHOWN;
} }
} }
Dismiss(event_time_stamp); Dismiss(event_time_stamp);
return ash::SHELF_ACTION_APP_LIST_DISMISSED; return SHELF_ACTION_APP_LIST_DISMISSED;
} }
Show(display_id, event_time_stamp); Show(display_id, event_time_stamp);
if (request_fullscreen) if (request_fullscreen)
view_->SetState(ash::AppListViewState::kFullscreenAllApps); view_->SetState(AppListViewState::kFullscreenAllApps);
return ash::SHELF_ACTION_APP_LIST_SHOWN; return SHELF_ACTION_APP_LIST_SHOWN;
} }
bool AppListPresenterImpl::IsVisibleDeprecated() const { bool AppListPresenterImpl::IsVisibleDeprecated() const {
...@@ -222,8 +222,7 @@ void AppListPresenterImpl::UpdateYPositionAndOpacity(int y_position_in_screen, ...@@ -222,8 +222,7 @@ void AppListPresenterImpl::UpdateYPositionAndOpacity(int y_position_in_screen,
view_->UpdateYPositionAndOpacity(y_position_in_screen, background_opacity); view_->UpdateYPositionAndOpacity(y_position_in_screen, background_opacity);
} }
void AppListPresenterImpl::EndDragFromShelf( void AppListPresenterImpl::EndDragFromShelf(AppListViewState app_list_state) {
ash::AppListViewState app_list_state) {
if (view_) if (view_)
view_->EndDragFromShelf(app_list_state); view_->EndDragFromShelf(app_list_state);
} }
......
...@@ -33,7 +33,7 @@ enum class AppListViewState; ...@@ -33,7 +33,7 @@ enum class AppListViewState;
// animation. While the UI is visible, it monitors things such as app list // animation. While the UI is visible, it monitors things such as app list
// activation state to auto dismiss the UI. // activation state to auto dismiss the UI.
class APP_LIST_EXPORT AppListPresenterImpl class APP_LIST_EXPORT AppListPresenterImpl
: public ash::PaginationModelObserver, : public PaginationModelObserver,
public aura::client::FocusChangeObserver, public aura::client::FocusChangeObserver,
public ui::ImplicitAnimationObserver, public ui::ImplicitAnimationObserver,
public views::WidgetObserver { public views::WidgetObserver {
...@@ -72,7 +72,7 @@ class APP_LIST_EXPORT AppListPresenterImpl ...@@ -72,7 +72,7 @@ class APP_LIST_EXPORT AppListPresenterImpl
// Show the app list if it is visible, hide it if it is hidden. If // Show the app list if it is visible, hide it if it is hidden. If
// |event_time_stamp| is not 0, it means |ToggleAppList()| was triggered by // |event_time_stamp| is not 0, it means |ToggleAppList()| was triggered by
// one of the AppListShowSources: kSearchKey or kShelfButton. // one of the AppListShowSources: kSearchKey or kShelfButton.
ash::ShelfAction ToggleAppList(int64_t display_id, ShelfAction ToggleAppList(int64_t display_id,
AppListShowSource show_source, AppListShowSource show_source,
base::TimeTicks event_time_stamp); base::TimeTicks event_time_stamp);
...@@ -93,7 +93,7 @@ class APP_LIST_EXPORT AppListPresenterImpl ...@@ -93,7 +93,7 @@ class APP_LIST_EXPORT AppListPresenterImpl
float background_opacity); float background_opacity);
// Ends the drag of app list from shelf. // Ends the drag of app list from shelf.
void EndDragFromShelf(ash::AppListViewState app_list_state); void EndDragFromShelf(AppListViewState app_list_state);
// Passes a MouseWheelEvent from the shelf to the AppListView. // Passes a MouseWheelEvent from the shelf to the AppListView.
void ProcessMouseWheelOffset(const gfx::Vector2d& scroll_offset_vector); void ProcessMouseWheelOffset(const gfx::Vector2d& scroll_offset_vector);
......
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