Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / find_bar_view.cc
index 1698820..830b85a 100644 (file)
 #include "ui/base/theme_provider.h"
 #include "ui/events/event.h"
 #include "ui/gfx/canvas.h"
+#include "ui/views/border.h"
 #include "ui/views/controls/button/image_button.h"
 #include "ui/views/controls/label.h"
+#include "ui/views/ime/input_method.h"
 #include "ui/views/painter.h"
 #include "ui/views/widget/widget.h"
 
@@ -229,6 +231,7 @@ void FindBarView::ClearMatchCount() {
 
 void FindBarView::SetFocusAndSelection(bool select_all) {
   find_text_->RequestFocus();
+  GetInputMethod()->ShowImeIfNeeded();
   if (select_all && !find_text_->text().empty())
     find_text_->SelectAll(true);
 }
@@ -337,7 +340,7 @@ void FindBarView::Layout() {
       find_previous_button_->height());
 }
 
-gfx::Size FindBarView::GetPreferredSize() {
+gfx::Size FindBarView::GetPreferredSize() const {
   gfx::Size prefsize = find_text_->GetPreferredSize();
   prefsize.set_height(preferred_height_);