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

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

Issue 8417025: aura: Update how the tooltip manager works. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile fixes 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_views.h" 5 #include "views/widget/native_widget_views.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/gfx/compositor/compositor.h" 8 #include "ui/gfx/compositor/compositor.h"
9 #include "views/view.h" 9 #include "views/view.h"
10 #include "views/views_delegate.h" 10 #include "views/views_delegate.h"
11 #include "views/widget/native_widget_view.h" 11 #include "views/widget/native_widget_view.h"
12 #include "views/widget/root_view.h" 12 #include "views/widget/root_view.h"
13 #include "views/widget/tooltip_manager_views.h"
13 #include "views/widget/window_manager.h" 14 #include "views/widget/window_manager.h"
14 15
15 #if defined(HAVE_IBUS) 16 #if defined(HAVE_IBUS)
16 #include "views/ime/input_method_ibus.h" 17 #include "views/ime/input_method_ibus.h"
17 #else 18 #else
18 #include "views/ime/mock_input_method.h" 19 #include "views/ime/mock_input_method.h"
19 #endif 20 #endif
20 21
21 #if defined(OS_LINUX) 22 #if defined(OS_LINUX)
22 #include "views/window/hit_test.h" 23 #include "views/window/hit_test.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 119
119 //////////////////////////////////////////////////////////////////////////////// 120 ////////////////////////////////////////////////////////////////////////////////
120 // NativeWidgetViews, protected: 121 // NativeWidgetViews, protected:
121 122
122 void NativeWidgetViews::OnBoundsChanged(const gfx::Rect& new_bounds, 123 void NativeWidgetViews::OnBoundsChanged(const gfx::Rect& new_bounds,
123 const gfx::Rect& old_bounds) { 124 const gfx::Rect& old_bounds) {
124 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 125 delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
125 } 126 }
126 127
127 bool NativeWidgetViews::OnMouseEvent(const MouseEvent& event) { 128 bool NativeWidgetViews::OnMouseEvent(const MouseEvent& event) {
129 #if defined(TOUCH_UI) || defined(USE_AURA)
varunjain 2011/10/28 16:09:23 I am wondering if we really need a views tooltip m
sadrul 2011/10/28 16:26:16 Indeed. Right now, apart from aura, only TOUCH_UI
130 TooltipManagerViews* tooltip_manager =
131 static_cast<TooltipManagerViews*>(GetTooltipManager());
sky 2011/10/28 17:47:27 Same comment about changing type of field to avoid
sadrul 2011/10/28 21:42:52 This is complicated here since NWViews doesn't act
132 if (tooltip_manager)
133 tooltip_manager->UpdateForMouseEvent(event);
134 #endif
128 return HandleWindowOperation(event) ? true : delegate_->OnMouseEvent(event); 135 return HandleWindowOperation(event) ? true : delegate_->OnMouseEvent(event);
129 } 136 }
130 137
131 //////////////////////////////////////////////////////////////////////////////// 138 ////////////////////////////////////////////////////////////////////////////////
132 // NativeWidgetViews, NativeWidget implementation: 139 // NativeWidgetViews, NativeWidget implementation:
133 140
134 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { 141 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) {
135 parent_ = params.parent_widget; 142 parent_ = params.parent_widget;
136 ownership_ = params.ownership; 143 ownership_ = params.ownership;
137 always_on_top_ = params.keep_on_top; 144 always_on_top_ = params.keep_on_top;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 } 634 }
628 default: 635 default:
629 // Everything else falls into standard client event handling. 636 // Everything else falls into standard client event handling.
630 break; 637 break;
631 } 638 }
632 } 639 }
633 return false; 640 return false;
634 } 641 }
635 642
636 } // namespace views 643 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698