diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:15:03 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:15:03 +0000 |
commit | 9861ae9e58cee87e1780ba00e2887a5f855a8ddf (patch) | |
tree | aad2eea2e0b5c9ab8395d50c75eab2dc256daf10 /views/view.cc | |
parent | 44b871fde45eacd5e843740a6c74e7cf6948da23 (diff) | |
download | chromium_src-9861ae9e58cee87e1780ba00e2887a5f855a8ddf.zip chromium_src-9861ae9e58cee87e1780ba00e2887a5f855a8ddf.tar.gz chromium_src-9861ae9e58cee87e1780ba00e2887a5f855a8ddf.tar.bz2 |
Clean up more of Widget.
- Move cross platform code to Widget.
- Move platform-specific code into focused Widget* implementations.
BUG=72040
TEST=existing
Review URL: http://codereview.chromium.org/6609023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/views/view.cc b/views/view.cc index 088c57f..bd778c645 100644 --- a/views/view.cc +++ b/views/view.cc @@ -18,6 +18,7 @@ #include "views/background.h" #include "views/layout/layout_manager.h" #include "views/views_delegate.h" +#include "views/widget/native_widget.h" #include "views/widget/root_view.h" #include "views/widget/tooltip_manager.h" #include "views/widget/widget.h" @@ -1155,8 +1156,8 @@ void View::Blur() { void View::TooltipTextChanged() { Widget* widget = GetWidget(); - if (widget && widget->GetTooltipManager()) - widget->GetTooltipManager()->TooltipTextChanged(this); + if (widget) + widget->native_widget()->GetTooltipManager()->TooltipTextChanged(this); } // Context menus --------------------------------------------------------------- @@ -1184,7 +1185,7 @@ void View::WriteDragData(const gfx::Point& press_pt, OSExchangeData* data) { bool View::InDrag() { Widget* widget = GetWidget(); - return widget ? widget->GetDraggedView() == this : false; + return widget ? widget->dragged_view() == this : false; } //////////////////////////////////////////////////////////////////////////////// @@ -1604,8 +1605,11 @@ void View::PropagateLocaleChanged() { void View::UpdateTooltip() { Widget* widget = GetWidget(); - if (widget && widget->GetTooltipManager()) - widget->GetTooltipManager()->UpdateTooltip(); + // TODO(beng): The TooltipManager NULL check can be removed when we + // consolidate Init() methods and make views_unittests Init() all + // Widgets that it uses. + if (widget && widget->native_widget()->GetTooltipManager()) + widget->native_widget()->GetTooltipManager()->UpdateTooltip(); } // Drag and drop --------------------------------------------------------------- @@ -1620,7 +1624,7 @@ void View::DoDrag(const MouseEvent& e, const gfx::Point& press_pt) { // Message the RootView to do the drag and drop. That way if we're removed // the RootView can detect it and avoid calling us back. - GetWidget()->StartDragForViewFromMouseEvent(this, data, drag_operations); + GetWidget()->RunShellDrag(this, data, drag_operations); } } // namespace views |