summaryrefslogtreecommitdiffstats
path: root/ui/app_list/views/app_list_page.cc
blob: 8a7b6f3bd9dbc7224afee42b13ec531301d19b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright 2015 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/app_list_page.h"

#include "ui/app_list/views/contents_view.h"

namespace {

// The default z height for the search box.
const int kDefaultSearchBoxZHeight = 2;
}

namespace app_list {

AppListPage::AppListPage() : contents_view_(nullptr) {
}

AppListPage::~AppListPage() {
}

void AppListPage::OnShown() {
}

void AppListPage::OnWillBeShown() {
}

void AppListPage::OnHidden() {
}

void AppListPage::OnWillBeHidden() {
}

void AppListPage::OnAnimationUpdated(double progress,
                                     AppListModel::State from_state,
                                     AppListModel::State to_state) {
}

gfx::Rect AppListPage::GetSearchBoxBounds() const {
  DCHECK(contents_view_);
  return contents_view_->GetDefaultSearchBoxBounds();
}

int AppListPage::GetSearchBoxZHeight() const {
  return kDefaultSearchBoxZHeight;
}

gfx::Rect AppListPage::GetAboveContentsOffscreenBounds(
    const gfx::Size& size) const {
  gfx::Rect rect(size);
  rect.set_y(-rect.height());
  return rect;
}

gfx::Rect AppListPage::GetBelowContentsOffscreenBounds(
    const gfx::Size& size) const {
  DCHECK(contents_view_);
  gfx::Rect rect(size);
  rect.set_y(contents_view_->GetContentsBounds().height());
  return rect;
}

gfx::Rect AppListPage::GetFullContentsBounds() const {
  DCHECK(contents_view_);
  return contents_view_->GetContentsBounds();
}

gfx::Rect AppListPage::GetDefaultContentsBounds() const {
  DCHECK(contents_view_);
  return contents_view_->GetDefaultContentsBounds();
}

}  // namespace app_list