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 "ui/views/views_touch_selection_controller_factory.h"
11 ViewsDelegate::ViewsDelegate()
12 : views_tsc_factory_(new ViewsTouchSelectionControllerFactory
) {
13 ui::TouchSelectionControllerFactory::SetInstance(views_tsc_factory_
.get());
16 ViewsDelegate::~ViewsDelegate() {
17 ui::TouchSelectionControllerFactory::SetInstance(NULL
);
20 void ViewsDelegate::SaveWindowPlacement(const Widget
* widget
,
21 const std::string
& window_name
,
22 const gfx::Rect
& bounds
,
23 ui::WindowShowState show_state
) {
26 bool ViewsDelegate::GetSavedWindowPlacement(
28 const std::string
& window_name
,
30 ui::WindowShowState
* show_state
) const {
34 void ViewsDelegate::NotifyAccessibilityEvent(View
* view
,
35 ui::AXEvent event_type
) {
38 void ViewsDelegate::NotifyMenuItemFocused(const base::string16
& menu_name
,
39 const base::string16
& menu_item_name
,
46 HICON
ViewsDelegate::GetDefaultWindowIcon() const {
50 bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window
) const {
53 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
54 gfx::ImageSkia
* ViewsDelegate::GetDefaultWindowIcon() const {
59 NonClientFrameView
* ViewsDelegate::CreateDefaultNonClientFrameView(
64 void ViewsDelegate::AddRef() {
67 void ViewsDelegate::ReleaseRef() {
70 content::WebContents
* ViewsDelegate::CreateWebContents(
71 content::BrowserContext
* browser_context
,
72 content::SiteInstance
* site_instance
) {
76 base::TimeDelta
ViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
77 return base::TimeDelta();
80 bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized
) {
85 ui::ContextFactory
* ViewsDelegate::GetContextFactory() {
91 int ViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor
,
92 const base::Closure
& callback
) {