1// Copyright (c) 2013 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.
4
5#include "ui/views/views_delegate.h"
6
7#include "ui/views/views_touch_selection_controller_factory.h"
8
9namespace views {
10
11ViewsDelegate::ViewsDelegate()
12    : views_tsc_factory_(new ViewsTouchSelectionControllerFactory) {
13  ui::TouchSelectionControllerFactory::SetInstance(views_tsc_factory_.get());
14}
15
16ViewsDelegate::~ViewsDelegate() {
17  ui::TouchSelectionControllerFactory::SetInstance(NULL);
18}
19
20void ViewsDelegate::SaveWindowPlacement(const Widget* widget,
21                                        const std::string& window_name,
22                                        const gfx::Rect& bounds,
23                                        ui::WindowShowState show_state) {
24}
25
26bool ViewsDelegate::GetSavedWindowPlacement(
27    const Widget* widget,
28    const std::string& window_name,
29    gfx::Rect* bounds,
30    ui::WindowShowState* show_state) const {
31  return false;
32}
33
34void ViewsDelegate::NotifyAccessibilityEvent(View* view,
35                                             ui::AXEvent event_type) {
36}
37
38void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name,
39                                          const base::string16& menu_item_name,
40                                          int item_index,
41                                          int item_count,
42                                          bool has_submenu) {
43}
44
45#if defined(OS_WIN)
46HICON ViewsDelegate::GetDefaultWindowIcon() const {
47  return NULL;
48}
49
50bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
51  return false;
52}
53#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
54gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
55  return NULL;
56}
57#endif
58
59NonClientFrameView* ViewsDelegate::CreateDefaultNonClientFrameView(
60    Widget* widget) {
61  return NULL;
62}
63
64void ViewsDelegate::AddRef() {
65}
66
67void ViewsDelegate::ReleaseRef() {
68}
69
70content::WebContents* ViewsDelegate::CreateWebContents(
71    content::BrowserContext* browser_context,
72    content::SiteInstance* site_instance) {
73  return NULL;
74}
75
76base::TimeDelta ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
77  return base::TimeDelta();
78}
79
80bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
81  return false;
82}
83
84#if defined(USE_AURA)
85ui::ContextFactory* ViewsDelegate::GetContextFactory() {
86  return NULL;
87}
88#endif
89
90#if defined(OS_WIN)
91int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
92                                          const base::Closure& callback) {
93  return EDGE_BOTTOM;
94}
95#endif
96
97}  // namespace views
98