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