Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / views / views_delegate.cc
blob4c1ae4f6b90ae5d70eba822e96959723e7ae3a04
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.
5 #include "ui/views/views_delegate.h"
7 #include "base/command_line.h"
8 #include "ui/views/views_touch_selection_controller_factory.h"
10 namespace views {
12 ViewsDelegate::ViewsDelegate()
13 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) {
14 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
17 ViewsDelegate::~ViewsDelegate() {
18 ui::TouchEditingControllerFactory::SetInstance(NULL);
21 void ViewsDelegate::SaveWindowPlacement(const Widget* widget,
22 const std::string& window_name,
23 const gfx::Rect& bounds,
24 ui::WindowShowState show_state) {
27 bool ViewsDelegate::GetSavedWindowPlacement(
28 const Widget* widget,
29 const std::string& window_name,
30 gfx::Rect* bounds,
31 ui::WindowShowState* show_state) const {
32 return false;
35 void ViewsDelegate::NotifyAccessibilityEvent(View* view,
36 ui::AXEvent event_type) {
39 void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name,
40 const base::string16& menu_item_name,
41 int item_index,
42 int item_count,
43 bool has_submenu) {
46 #if defined(OS_WIN)
47 HICON ViewsDelegate::GetDefaultWindowIcon() const {
48 return NULL;
51 bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
52 return false;
54 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
55 gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
56 return NULL;
58 #endif
60 NonClientFrameView* ViewsDelegate::CreateDefaultNonClientFrameView(
61 Widget* widget) {
62 return NULL;
65 void ViewsDelegate::AddRef() {
68 void ViewsDelegate::ReleaseRef() {
71 content::WebContents* ViewsDelegate::CreateWebContents(
72 content::BrowserContext* browser_context,
73 content::SiteInstance* site_instance) {
74 return NULL;
77 base::TimeDelta ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
78 return base::TimeDelta();
81 bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
82 return false;
85 ui::ContextFactory* ViewsDelegate::GetContextFactory() {
86 return NULL;
89 std::string ViewsDelegate::GetApplicationName() {
90 base::FilePath program = base::CommandLine::ForCurrentProcess()->GetProgram();
91 return program.BaseName().AsUTF8Unsafe();
94 #if defined(OS_WIN)
95 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
96 const base::Closure& callback) {
97 return EDGE_BOTTOM;
99 #endif
101 } // namespace views