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

Unified Diff: ui/app_list/views/test/apps_grid_view_test_api.cc

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/test/apps_grid_view_test_api.h ('k') | ui/app_list/views/tile_item_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/test/apps_grid_view_test_api.cc
diff --git a/ui/app_list/views/test/apps_grid_view_test_api.cc b/ui/app_list/views/test/apps_grid_view_test_api.cc
deleted file mode 100644
index 1142f113d645363c43a040bc9c9ae2b40e1966da..0000000000000000000000000000000000000000
--- a/ui/app_list/views/test/apps_grid_view_test_api.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "ui/app_list/views/test/apps_grid_view_test_api.h"
-
-#include "ui/app_list/views/app_list_item_view.h"
-#include "ui/app_list/views/apps_grid_view.h"
-#include "ui/events/event.h"
-
-namespace app_list {
-namespace test {
-
-AppsGridViewTestApi::AppsGridViewTestApi(AppsGridView* view)
- : view_(view) {
-}
-
-AppsGridViewTestApi::~AppsGridViewTestApi() {
-}
-
-views::View* AppsGridViewTestApi::GetViewAtModelIndex(int index) const {
- return view_->view_model_.view_at(index);
-}
-
-void AppsGridViewTestApi::LayoutToIdealBounds() {
- if (view_->reorder_timer_.IsRunning()) {
- view_->reorder_timer_.Stop();
- view_->OnReorderTimer();
- }
- if (view_->folder_dropping_timer_.IsRunning()) {
- view_->folder_dropping_timer_.Stop();
- view_->OnFolderDroppingTimer();
- }
- view_->bounds_animator_.Cancel();
- view_->Layout();
-}
-
-void AppsGridViewTestApi::SetPageFlipDelay(int page_flip_delay_in_ms) {
- view_->page_flip_delay_in_ms_ = page_flip_delay_in_ms;
-}
-
-void AppsGridViewTestApi::PressItemAt(int index) {
- GetViewAtModelIndex(index)->OnKeyPressed(
- ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_RETURN, ui::EF_NONE));
-}
-
-void AppsGridViewTestApi::DisableSynchronousDrag() {
-#if defined(OS_WIN)
- DCHECK(view_->synchronous_drag_ == NULL) << "DisableSynchronousDrag needs to "
- "be called before "
- "synchronous_drag_ is set up.";
- view_->use_synchronous_drag_ = false;
-#endif
-}
-
-bool AppsGridViewTestApi::HasPendingPageFlip() const {
- return view_->page_flip_timer_.IsRunning() ||
- view_->pagination_model()->has_transition();
-}
-
-} // namespace test
-} // namespace app_list
« no previous file with comments | « ui/app_list/views/test/apps_grid_view_test_api.h ('k') | ui/app_list/views/tile_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698