Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: ui/app_list/views/start_page_view.h

Issue 645853013: Remove some platform specific stuff from views. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/speech_view_unittest.cc ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/start_page_view.h
diff --git a/ui/app_list/views/start_page_view.h b/ui/app_list/views/start_page_view.h
deleted file mode 100644
index 2949ec5fd42de3b05735a3adb06fb1e9aa136dfa..0000000000000000000000000000000000000000
--- a/ui/app_list/views/start_page_view.h
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
-#define UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
-
-#include "base/basictypes.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/app_list/app_list_export.h"
-#include "ui/app_list/app_list_model.h"
-#include "ui/app_list/app_list_view_delegate_observer.h"
-#include "ui/app_list/views/search_box_view_delegate.h"
-#include "ui/base/models/list_model_observer.h"
-#include "ui/views/view.h"
-
-namespace app_list {
-
-class AppListMainView;
-class AppListViewDelegate;
-class SearchResultListView;
-class TileItemView;
-
-// The start page for the experimental app list.
-class APP_LIST_EXPORT StartPageView : public views::View,
- public ui::ListModelObserver,
- public SearchBoxViewDelegate {
- public:
- StartPageView(AppListMainView* app_list_main_view,
- AppListViewDelegate* view_delegate);
- virtual ~StartPageView();
-
- void Reset();
- void ShowSearchResults();
-
- bool IsShowingSearchResults() const;
-
- void UpdateForTesting();
-
- const std::vector<TileItemView*>& tile_views() const { return tile_views_; }
- SearchBoxView* dummy_search_box_view() { return search_box_view_; }
-
- // Overridden from views::View:
- virtual bool OnKeyPressed(const ui::KeyEvent& event) override;
- virtual void Layout() override;
-
- private:
- enum ShowState {
- SHOW_START_PAGE,
- SHOW_SEARCH_RESULTS,
- };
-
- void InitInstantContainer();
- void InitTilesContainer();
-
- void SetShowState(ShowState show_state);
- void SetModel(AppListModel* model);
-
- // Updates UI with model.
- void Update();
-
- // Schedules an Update() call using |update_factory_|. Does nothing if there
- // is a pending call.
- void ScheduleUpdate();
-
- // Overridden from SearchBoxViewDelegate:
- virtual void QueryChanged(SearchBoxView* sender) override;
-
- // Overridden from ui::ListModelObserver:
- virtual void ListItemsAdded(size_t start, size_t count) override;
- virtual void ListItemsRemoved(size_t start, size_t count) override;
- virtual void ListItemMoved(size_t index, size_t target_index) override;
- virtual void ListItemsChanged(size_t start, size_t count) override;
-
- // The parent view of ContentsView which is the parent of this view.
- AppListMainView* app_list_main_view_;
-
- AppListModel::SearchResults*
- search_results_model_; // Owned by AppListSyncableService.
-
- AppListViewDelegate* view_delegate_; // Owned by AppListView.
-
- SearchBoxView* search_box_view_; // Owned by views hierarchy.
- SearchResultListView* results_view_; // Owned by views hierarchy.
- views::View* instant_container_; // Owned by views hierarchy.
- views::View* tiles_container_; // Owned by views hierarchy.
-
- std::vector<TileItemView*> tile_views_;
-
- ShowState show_state_;
-
- // ScheduleUpdate() generates a single weak pointer; if one exists then an
- // update is pending. Further calls to ScheduleUpdate() will have no effect.
- // Once the Update() completes, the weak pointer is invalidated.
- base::WeakPtrFactory<StartPageView> update_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(StartPageView);
-};
-
-} // namespace app_list
-
-#endif // UI_APP_LIST_VIEWS_START_PAGE_VIEW_H_
« no previous file with comments | « ui/app_list/views/speech_view_unittest.cc ('k') | ui/app_list/views/start_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698