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

Unified Diff: ui/views/controls/prefix_selector.cc

Issue 2289143004: Add ink drop ripple (but no highlight) to comboboxes in harmony. (Closed)
Patch Set: remove explicit and improve combobox example Created 4 years, 4 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/controls/prefix_selector.h ('k') | ui/views/controls/prefix_selector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/prefix_selector.cc
diff --git a/ui/views/controls/prefix_selector.cc b/ui/views/controls/prefix_selector.cc
index bd57addeaecf3458cdd8cc47b39bf73cc1558cdf..b21ff34e09e118ecd4b39894bfc0b109e298ab75 100644
--- a/ui/views/controls/prefix_selector.cc
+++ b/ui/views/controls/prefix_selector.cc
@@ -9,6 +9,7 @@
#include "ui/base/ime/text_input_type.h"
#include "ui/gfx/range/range.h"
#include "ui/views/controls/prefix_delegate.h"
+#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -27,8 +28,8 @@ void ConvertRectToScreen(const views::View* src, gfx::Rect* r) {
} // namespace
-PrefixSelector::PrefixSelector(PrefixDelegate* delegate)
- : prefix_delegate_(delegate) {
+PrefixSelector::PrefixSelector(PrefixDelegate* delegate, View* host_view)
+ : prefix_delegate_(delegate), host_view_(host_view) {
}
PrefixSelector::~PrefixSelector() {
@@ -77,10 +78,10 @@ bool PrefixSelector::CanComposeInline() const {
}
gfx::Rect PrefixSelector::GetCaretBounds() const {
- gfx::Rect rect(prefix_delegate_->GetVisibleBounds().origin(), gfx::Size());
+ gfx::Rect rect(host_view_->GetVisibleBounds().origin(), gfx::Size());
// TextInputClient::GetCaretBounds is expected to return a value in screen
// coordinates.
- ConvertRectToScreen(prefix_delegate_, &rect);
+ ConvertRectToScreen(host_view_, &rect);
return rect;
}
« no previous file with comments | « ui/views/controls/prefix_selector.h ('k') | ui/views/controls/prefix_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698