Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: views/widget/native_widget_aura.cc

Issue 8371024: Enable tooltips for aura. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: added file missing in previous patch Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/native_widget_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/aura/window_types.h" 11 #include "ui/aura/window_types.h"
12 #include "ui/base/ui_base_types.h" 12 #include "ui/base/ui_base_types.h"
13 #include "ui/gfx/canvas.h" 13 #include "ui/gfx/canvas.h"
14 #include "ui/gfx/compositor/layer.h" 14 #include "ui/gfx/compositor/layer.h"
15 #include "ui/gfx/font.h" 15 #include "ui/gfx/font.h"
16 #include "ui/gfx/screen.h" 16 #include "ui/gfx/screen.h"
17 #include "views/widget/native_widget_delegate.h" 17 #include "views/widget/native_widget_delegate.h"
18 #include "views/widget/tooltip_manager_views.h"
18 19
19 #if defined(OS_WIN) 20 #if defined(OS_WIN)
20 #include "base/win/scoped_gdi_object.h" 21 #include "base/win/scoped_gdi_object.h"
21 #include "base/win/win_util.h" 22 #include "base/win/win_util.h"
22 #include "ui/base/l10n/l10n_util_win.h" 23 #include "ui/base/l10n/l10n_util_win.h"
23 #endif 24 #endif
24 25
25 #if defined(HAVE_IBUS) 26 #if defined(HAVE_IBUS)
26 #include "views/ime/input_method_ibus.h" 27 #include "views/ime/input_method_ibus.h"
27 #else 28 #else
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 window_->SetBounds(params.bounds); 84 window_->SetBounds(params.bounds);
84 if (params.type == Widget::InitParams::TYPE_CONTROL) { 85 if (params.type == Widget::InitParams::TYPE_CONTROL) {
85 window_->SetParent(params.parent); 86 window_->SetParent(params.parent);
86 } else { 87 } else {
87 window_->SetParent(NULL); 88 window_->SetParent(NULL);
88 // TODO(derat): Set Transient Parent. 89 // TODO(derat): Set Transient Parent.
89 } 90 }
90 // TODO(beng): do this some other way. 91 // TODO(beng): do this some other way.
91 delegate_->OnNativeWidgetSizeChanged(params.bounds.size()); 92 delegate_->OnNativeWidgetSizeChanged(params.bounds.size());
92 can_activate_ = params.can_activate; 93 can_activate_ = params.can_activate;
94 if (params.type != Widget::InitParams::TYPE_TOOLTIP && !params.child) {
95 DCHECK(GetWidget()->GetRootView());
96 views::TooltipManagerViews* manager = new views::TooltipManagerViews(
97 GetWidget()->GetRootView());
98 tooltip_manager_.reset(manager);
99 }
93 } 100 }
94 101
95 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() { 102 NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() {
96 NOTIMPLEMENTED(); 103 NOTIMPLEMENTED();
97 return NULL; 104 return NULL;
98 } 105 }
99 106
100 void NativeWidgetAura::UpdateFrameAfterFrameChange() { 107 void NativeWidgetAura::UpdateFrameAfterFrameChange() {
101 // We don't support changing the frame type. 108 // We don't support changing the frame type.
102 NOTREACHED(); 109 NOTREACHED();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 window_->SetProperty(name, value); 170 window_->SetProperty(name, value);
164 } 171 }
165 172
166 void* NativeWidgetAura::GetNativeWindowProperty(const char* name) const { 173 void* NativeWidgetAura::GetNativeWindowProperty(const char* name) const {
167 if (!window_) 174 if (!window_)
168 return NULL; 175 return NULL;
169 return window_->GetProperty(name); 176 return window_->GetProperty(name);
170 } 177 }
171 178
172 TooltipManager* NativeWidgetAura::GetTooltipManager() const { 179 TooltipManager* NativeWidgetAura::GetTooltipManager() const {
173 //NOTIMPLEMENTED(); 180 return tooltip_manager_.get();
174 return NULL;
175 } 181 }
176 182
177 bool NativeWidgetAura::IsScreenReaderActive() const { 183 bool NativeWidgetAura::IsScreenReaderActive() const {
178 NOTIMPLEMENTED(); 184 NOTIMPLEMENTED();
179 return false; 185 return false;
180 } 186 }
181 187
182 void NativeWidgetAura::SendNativeAccessibilityEvent( 188 void NativeWidgetAura::SendNativeAccessibilityEvent(
183 View* view, 189 View* view,
184 ui::AccessibilityTypes::Event event_type) { 190 ui::AccessibilityTypes::Event event_type) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 637 }
632 638
633 // static 639 // static
634 bool NativeWidgetPrivate::IsMouseButtonDown() { 640 bool NativeWidgetPrivate::IsMouseButtonDown() {
635 NOTIMPLEMENTED(); 641 NOTIMPLEMENTED();
636 return false; 642 return false;
637 } 643 }
638 644
639 } // namespace internal 645 } // namespace internal
640 } // namespace views 646 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698