disable two ClientCertStoreChromeOSTest.* unit_tests on Valgrind bots
[chromium-blink-merge.git] / ui / app_list / views / app_list_page.cc
blob8a7b6f3bd9dbc7224afee42b13ec531301d19b34
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/app_list/views/app_list_page.h"
7 #include "ui/app_list/views/contents_view.h"
9 namespace {
11 // The default z height for the search box.
12 const int kDefaultSearchBoxZHeight = 2;
15 namespace app_list {
17 AppListPage::AppListPage() : contents_view_(nullptr) {
20 AppListPage::~AppListPage() {
23 void AppListPage::OnShown() {
26 void AppListPage::OnWillBeShown() {
29 void AppListPage::OnHidden() {
32 void AppListPage::OnWillBeHidden() {
35 void AppListPage::OnAnimationUpdated(double progress,
36 AppListModel::State from_state,
37 AppListModel::State to_state) {
40 gfx::Rect AppListPage::GetSearchBoxBounds() const {
41 DCHECK(contents_view_);
42 return contents_view_->GetDefaultSearchBoxBounds();
45 int AppListPage::GetSearchBoxZHeight() const {
46 return kDefaultSearchBoxZHeight;
49 gfx::Rect AppListPage::GetAboveContentsOffscreenBounds(
50 const gfx::Size& size) const {
51 gfx::Rect rect(size);
52 rect.set_y(-rect.height());
53 return rect;
56 gfx::Rect AppListPage::GetBelowContentsOffscreenBounds(
57 const gfx::Size& size) const {
58 DCHECK(contents_view_);
59 gfx::Rect rect(size);
60 rect.set_y(contents_view_->GetContentsBounds().height());
61 return rect;
64 gfx::Rect AppListPage::GetFullContentsBounds() const {
65 DCHECK(contents_view_);
66 return contents_view_->GetContentsBounds();
69 gfx::Rect AppListPage::GetDefaultContentsBounds() const {
70 DCHECK(contents_view_);
71 return contents_view_->GetDefaultContentsBounds();
74 } // namespace app_list