Commit 7c60fc77 authored by Toni Barzic's avatar Toni Barzic Committed by Commit Bot

Remove SearchBoxViewBase::GetSelectedViewInContentsView

It's currently always returning nullptr.

BUG=None

Change-Id: Ib953cf14ae956309ef6077adb000edbbec8561f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2472701Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817286}
parent a588fc2c
...@@ -41,10 +41,6 @@ void AppListPage::UpdatePageBoundsForState(AppListState state, ...@@ -41,10 +41,6 @@ void AppListPage::UpdatePageBoundsForState(AppListState state,
GetPageBoundsForState(state, contents_bounds, search_box_bounds)); GetPageBoundsForState(state, contents_bounds, search_box_bounds));
} }
views::View* AppListPage::GetSelectedView() const {
return nullptr;
}
views::View* AppListPage::GetFirstFocusableView() { views::View* AppListPage::GetFirstFocusableView() {
return nullptr; return nullptr;
} }
......
...@@ -101,9 +101,6 @@ class APP_LIST_EXPORT AppListPage : public views::View { ...@@ -101,9 +101,6 @@ class APP_LIST_EXPORT AppListPage : public views::View {
contents_view_ = contents_view; contents_view_ = contents_view;
} }
// Returns selected view in this page.
virtual views::View* GetSelectedView() const;
// Returns the first focusable view in this page. // Returns the first focusable view in this page.
virtual views::View* GetFirstFocusableView(); virtual views::View* GetFirstFocusableView();
......
...@@ -661,10 +661,6 @@ void ContentsView::TransitionChanged() { ...@@ -661,10 +661,6 @@ void ContentsView::TransitionChanged() {
UpdateSearchBoxAnimation(progress, current_state, target_state); UpdateSearchBoxAnimation(progress, current_state, target_state);
} }
views::View* ContentsView::GetSelectedView() const {
return app_list_pages_[GetActivePageIndex()]->GetSelectedView();
}
void ContentsView::UpdateYPositionAndOpacity() { void ContentsView::UpdateYPositionAndOpacity() {
const int current_page = pagination_model_.has_transition() const int current_page = pagination_model_.has_transition()
? pagination_model_.transition().target_page ? pagination_model_.transition().target_page
......
...@@ -194,9 +194,6 @@ class APP_LIST_EXPORT ContentsView : public views::View, ...@@ -194,9 +194,6 @@ class APP_LIST_EXPORT ContentsView : public views::View,
void TransitionStarted() override; void TransitionStarted() override;
void TransitionChanged() override; void TransitionChanged() override;
// Returns selected view in active page.
views::View* GetSelectedView() const;
// Updates y position and opacity of the items in this view during dragging. // Updates y position and opacity of the items in this view during dragging.
void UpdateYPositionAndOpacity(); void UpdateYPositionAndOpacity();
......
...@@ -134,12 +134,6 @@ void SearchBoxView::ClearSearch() { ...@@ -134,12 +134,6 @@ void SearchBoxView::ClearSearch() {
true, false /*triggered_by_contents_change*/); true, false /*triggered_by_contents_change*/);
} }
views::View* SearchBoxView::GetSelectedViewInContentsView() {
if (!contents_view_)
return nullptr;
return contents_view_->GetSelectedView();
}
void SearchBoxView::HandleSearchBoxEvent(ui::LocatedEvent* located_event) { void SearchBoxView::HandleSearchBoxEvent(ui::LocatedEvent* located_event) {
if (located_event->type() == ui::ET_MOUSEWHEEL) { if (located_event->type() == ui::ET_MOUSEWHEEL) {
if (!app_list_view_->HandleScroll( if (!app_list_view_->HandleScroll(
......
...@@ -50,7 +50,6 @@ class APP_LIST_EXPORT SearchBoxView : public SearchBoxViewBase, ...@@ -50,7 +50,6 @@ class APP_LIST_EXPORT SearchBoxView : public SearchBoxViewBase,
// Overridden from SearchBoxViewBase: // Overridden from SearchBoxViewBase:
void ClearSearch() override; void ClearSearch() override;
views::View* GetSelectedViewInContentsView() override;
void HandleSearchBoxEvent(ui::LocatedEvent* located_event) override; void HandleSearchBoxEvent(ui::LocatedEvent* located_event) override;
void ModelChanged() override; void ModelChanged() override;
void UpdateKeyboardVisibility() override; void UpdateKeyboardVisibility() override;
......
...@@ -175,19 +175,6 @@ class SearchBoxTextfield : public views::Textfield { ...@@ -175,19 +175,6 @@ class SearchBoxTextfield : public views::Textfield {
~SearchBoxTextfield() override = default; ~SearchBoxTextfield() override = default;
// Overridden from views::View: // Overridden from views::View:
void ShowContextMenu(const gfx::Point& p,
ui::MenuSourceType source_type) override {
views::View* selected_view =
search_box_view_->GetSelectedViewInContentsView();
if (source_type != ui::MENU_SOURCE_KEYBOARD || !selected_view) {
views::Textfield::ShowContextMenu(p, source_type);
return;
}
selected_view->ShowContextMenu(
selected_view->GetKeyboardContextMenuLocation(),
ui::MENU_SOURCE_KEYBOARD);
}
void OnFocus() override { void OnFocus() override {
search_box_view_->OnSearchBoxFocusedChanged(); search_box_view_->OnSearchBoxFocusedChanged();
Textfield::OnFocus(); Textfield::OnFocus();
...@@ -451,10 +438,6 @@ void SearchBoxViewBase::ClearSearch() { ...@@ -451,10 +438,6 @@ void SearchBoxViewBase::ClearSearch() {
NotifyQueryChanged(); NotifyQueryChanged();
} }
views::View* SearchBoxViewBase::GetSelectedViewInContentsView() {
return nullptr;
}
void SearchBoxViewBase::NotifyQueryChanged() { void SearchBoxViewBase::NotifyQueryChanged() {
DCHECK(delegate_); DCHECK(delegate_);
delegate_->QueryChanged(this); delegate_->QueryChanged(this);
......
...@@ -118,9 +118,6 @@ class SearchBoxViewBase : public views::WidgetDelegateView, ...@@ -118,9 +118,6 @@ class SearchBoxViewBase : public views::WidgetDelegateView,
virtual void ClearSearch(); virtual void ClearSearch();
// Returns selected view in contents view.
virtual views::View* GetSelectedViewInContentsView();
protected: protected:
// Fires query change notification. // Fires query change notification.
void NotifyQueryChanged(); void NotifyQueryChanged();
......
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