Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / ui / views / views_delegate.cc
blob507b038a7b6e7547007a2a5112ae644b7171a3aa
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 #if defined(USE_AURA)
11 #include "ui/views/touchui/touch_selection_menu_runner_views.h"
12 #endif
14 namespace views {
16 ViewsDelegate::ViewsDelegate()
17 : views_tsc_factory_(new ViewsTouchEditingControllerFactory) {
18 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
20 #if defined(USE_AURA)
21 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
22 #endif
25 ViewsDelegate::~ViewsDelegate() {
26 ui::TouchEditingControllerFactory::SetInstance(NULL);
29 void ViewsDelegate::SaveWindowPlacement(const Widget* widget,
30 const std::string& window_name,
31 const gfx::Rect& bounds,
32 ui::WindowShowState show_state) {
35 bool ViewsDelegate::GetSavedWindowPlacement(
36 const Widget* widget,
37 const std::string& window_name,
38 gfx::Rect* bounds,
39 ui::WindowShowState* show_state) const {
40 return false;
43 void ViewsDelegate::NotifyAccessibilityEvent(View* view,
44 ui::AXEvent event_type) {
47 void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name,
48 const base::string16& menu_item_name,
49 int item_index,
50 int item_count,
51 bool has_submenu) {
54 #if defined(OS_WIN)
55 HICON ViewsDelegate::GetDefaultWindowIcon() const {
56 return NULL;
59 bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
60 return false;
62 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
63 gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
64 return NULL;
66 #endif
68 NonClientFrameView* ViewsDelegate::CreateDefaultNonClientFrameView(
69 Widget* widget) {
70 return NULL;
73 void ViewsDelegate::AddRef() {
76 void ViewsDelegate::ReleaseRef() {
79 content::WebContents* ViewsDelegate::CreateWebContents(
80 content::BrowserContext* browser_context,
81 content::SiteInstance* site_instance) {
82 return NULL;
85 base::TimeDelta ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
86 return base::TimeDelta();
89 bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
90 return false;
93 ui::ContextFactory* ViewsDelegate::GetContextFactory() {
94 return NULL;
97 std::string ViewsDelegate::GetApplicationName() {
98 base::FilePath program = base::CommandLine::ForCurrentProcess()->GetProgram();
99 return program.BaseName().AsUTF8Unsafe();
102 #if defined(OS_WIN)
103 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
104 const base::Closure& callback) {
105 return EDGE_BOTTOM;
107 #endif
109 scoped_refptr<base::TaskRunner> ViewsDelegate::GetBlockingPoolTaskRunner() {
110 return nullptr;
113 } // namespace views