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

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: . 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
« no previous file with comments | « views/widget/native_widget_aura.cc ('k') | views/widget/tooltip_manager_views.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/gfx/compositor/layer.h" 9 #include "ui/gfx/compositor/layer.h"
10 #include "ui/gfx/compositor/layer_animator.h" 10 #include "ui/gfx/compositor/layer_animator.h"
11 #include "views/view.h" 11 #include "views/view.h"
12 #include "views/views_delegate.h" 12 #include "views/views_delegate.h"
13 #include "views/widget/native_widget_view.h" 13 #include "views/widget/native_widget_view.h"
14 #include "views/widget/root_view.h" 14 #include "views/widget/root_view.h"
15 #include "views/widget/tooltip_manager_views.h"
15 #include "views/widget/window_manager.h" 16 #include "views/widget/window_manager.h"
16 17
17 #if defined(HAVE_IBUS) 18 #if defined(HAVE_IBUS)
18 #include "views/ime/input_method_ibus.h" 19 #include "views/ime/input_method_ibus.h"
19 #else 20 #else
20 #include "views/ime/mock_input_method.h" 21 #include "views/ime/mock_input_method.h"
21 #endif 22 #endif
22 23
23 #if defined(OS_LINUX) 24 #if defined(OS_LINUX)
24 #include "views/window/hit_test.h" 25 #include "views/window/hit_test.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 //////////////////////////////////////////////////////////////////////////////// 122 ////////////////////////////////////////////////////////////////////////////////
122 // NativeWidgetViews, protected: 123 // NativeWidgetViews, protected:
123 124
124 void NativeWidgetViews::OnBoundsChanged(const gfx::Rect& new_bounds, 125 void NativeWidgetViews::OnBoundsChanged(const gfx::Rect& new_bounds,
125 const gfx::Rect& old_bounds) { 126 const gfx::Rect& old_bounds) {
126 delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 127 delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
127 } 128 }
128 129
129 bool NativeWidgetViews::OnMouseEvent(const MouseEvent& event) { 130 bool NativeWidgetViews::OnMouseEvent(const MouseEvent& event) {
131 #if defined(TOUCH_UI) || defined(USE_AURA)
132 TooltipManagerViews* tooltip_manager =
133 static_cast<TooltipManagerViews*>(GetTooltipManager());
134 if (tooltip_manager)
135 tooltip_manager->UpdateForMouseEvent(event);
136 #endif
130 return HandleWindowOperation(event) ? true : delegate_->OnMouseEvent(event); 137 return HandleWindowOperation(event) ? true : delegate_->OnMouseEvent(event);
131 } 138 }
132 139
133 //////////////////////////////////////////////////////////////////////////////// 140 ////////////////////////////////////////////////////////////////////////////////
134 // NativeWidgetViews, NativeWidget implementation: 141 // NativeWidgetViews, NativeWidget implementation:
135 142
136 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) { 143 void NativeWidgetViews::InitNativeWidget(const Widget::InitParams& params) {
137 parent_ = params.parent_widget; 144 parent_ = params.parent_widget;
138 ownership_ = params.ownership; 145 ownership_ = params.ownership;
139 always_on_top_ = params.keep_on_top; 146 always_on_top_ = params.keep_on_top;
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } 642 }
636 default: 643 default:
637 // Everything else falls into standard client event handling. 644 // Everything else falls into standard client event handling.
638 break; 645 break;
639 } 646 }
640 } 647 }
641 return false; 648 return false;
642 } 649 }
643 650
644 } // namespace views 651 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_aura.cc ('k') | views/widget/tooltip_manager_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698