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

Unified Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 2390953004: WidgetDelegateView is its own contents view. (Closed)
Patch Set: minor fixes Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/examples_window.cc ('k') | ui/views/widget/widget_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/touchui/touch_selection_controller_impl.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl.cc b/ui/views/touchui/touch_selection_controller_impl.cc
index 1e80313596406b892fb638a4e9fe3bc6713c5138..c4c5d26e93a425cd00f407e1a3189bb653d6716f 100644
--- a/ui/views/touchui/touch_selection_controller_impl.cc
+++ b/ui/views/touchui/touch_selection_controller_impl.cc
@@ -237,7 +237,6 @@ class TouchSelectionControllerImpl::EditingHandleView
draw_invisible_(false),
weak_ptr_factory_(this) {
widget_.reset(CreateTouchSelectionPopupWidget(context, this));
- widget_->SetContentsView(this);
aura::Window* window = widget_->GetNativeWindow();
window->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
@@ -321,6 +320,8 @@ class TouchSelectionControllerImpl::EditingHandleView
}
gfx::Size GetPreferredSize() const override {
+ if (selection_bound_.type() == gfx::SelectionBound::EMPTY)
sky 2016/10/06 16:49:20 It would be nice if you had a comment as to why th
Evan Stade 2016/10/06 16:51:44 Done.
+ return gfx::Size();
return GetSelectionWidgetBounds(selection_bound_).size();
}
« no previous file with comments | « ui/views/examples/examples_window.cc ('k') | ui/views/widget/widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698