summaryrefslogtreecommitdiffstats
path: root/ash/test/test_shell_delegate.cc
blob: 67f10228456fe71be1327a6dd75f5d9a9a67f077 (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
// 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 "ash/test/test_shell_delegate.h"

#include <algorithm>

#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "grit/ui_resources.h"
#include "ui/aura/window.h"

namespace ash {
namespace test {

TestShellDelegate::TestShellDelegate() {
}

TestShellDelegate::~TestShellDelegate() {
}

void TestShellDelegate::CreateNewWindow() {
}

views::Widget* TestShellDelegate::CreateStatusArea() {
  return NULL;
}

void TestShellDelegate::BuildAppListModel(AppListModel* model) {
}

AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() {
  return NULL;
}

std::vector<aura::Window*> TestShellDelegate::GetCycleWindowList(
    CycleSource source,
    CycleOrder order) const {
  // We just use the Shell's default container of windows, so tests can be
  // written with the usual CreateTestWindowWithId() calls. But window cycling
  // expects the topmost window at the front of the list, so reverse the order.
  aura::Window* default_container = Shell::GetInstance()->GetContainer(
      internal::kShellWindowId_DefaultContainer);
  std::vector<aura::Window*> windows = default_container->children();
  std::reverse(windows.begin(), windows.end());
  return windows;
}

void TestShellDelegate::LauncherItemClicked(const LauncherItem& item) {
}

bool TestShellDelegate::ConfigureLauncherItem(LauncherItem* item) {
  return true;
}

int TestShellDelegate::GetBrowserShortcutResourceId() {
  return IDR_AURA_LAUNCHER_BROWSER_SHORTCUT;
}

}  // namespace test
}  // namespace ash