| Index: ui/app_list/views/search_box_view.cc
|
| diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
|
| index 6852d3419c03cbea51be5199c73e874640a7242b..012839f271f5d6a79fe7787c8671db1e19730a02 100644
|
| --- a/ui/app_list/views/search_box_view.cc
|
| +++ b/ui/app_list/views/search_box_view.cc
|
| @@ -16,7 +16,6 @@
|
| #include "ui/app_list/resources/grit/app_list_resources.h"
|
| #include "ui/app_list/search_box_model.h"
|
| #include "ui/app_list/speech_ui_model.h"
|
| -#include "ui/app_list/views/app_list_menu_views.h"
|
| #include "ui/app_list/views/contents_view.h"
|
| #include "ui/app_list/views/search_box_view_delegate.h"
|
| #include "ui/base/ime/text_input_flags.h"
|
| @@ -28,7 +27,6 @@
|
| #include "ui/strings/grit/ui_strings.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/controls/button/image_button.h"
|
| -#include "ui/views/controls/button/menu_button.h"
|
| #include "ui/views/controls/image_view.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/layout/box_layout.h"
|
| @@ -46,10 +44,6 @@ const int kPreferredHeight = 48;
|
|
|
| const SkColor kHintTextColor = SkColorSetRGB(0xA0, 0xA0, 0xA0);
|
|
|
| -// Menu offset relative to the bottom-right corner of the menu button.
|
| -const int kMenuYOffsetFromButton = -4;
|
| -const int kMenuXOffsetFromButton = -7;
|
| -
|
| const int kBackgroundBorderCornerRadius = 2;
|
|
|
| // A background that paints a solid white rounded rect with a thin grey border.
|
| @@ -124,7 +118,6 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
|
| icon_view_(NULL),
|
| back_button_(NULL),
|
| speech_button_(NULL),
|
| - menu_button_(NULL),
|
| search_box_(new views::Textfield),
|
| contents_view_(NULL),
|
| focused_view_(FOCUS_SEARCH_BOX) {
|
| @@ -171,19 +164,6 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
|
| content_container_->AddChildView(search_box_);
|
| layout->SetFlexForView(search_box_, 1);
|
|
|
| -#if !defined(OS_CHROMEOS)
|
| - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| - menu_button_ = new views::MenuButton(base::string16(), this, false);
|
| - menu_button_->SetBorder(views::Border::NullBorder());
|
| - menu_button_->SetImage(views::Button::STATE_NORMAL,
|
| - *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_NORMAL));
|
| - menu_button_->SetImage(views::Button::STATE_HOVERED,
|
| - *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_HOVER));
|
| - menu_button_->SetImage(views::Button::STATE_PRESSED,
|
| - *rb.GetImageSkiaNamed(IDR_APP_LIST_TOOLS_PRESSED));
|
| - content_container_->AddChildView(menu_button_);
|
| -#endif
|
| -
|
| view_delegate_->GetSpeechUI()->AddObserver(this);
|
| ModelChanged();
|
| }
|
| @@ -218,10 +198,6 @@ void SearchBoxView::ClearSearch() {
|
| NotifyQueryChanged();
|
| }
|
|
|
| -void SearchBoxView::InvalidateMenu() {
|
| - menu_.reset();
|
| -}
|
| -
|
| void SearchBoxView::SetShadow(const gfx::ShadowValue& shadow) {
|
| SetBorder(base::WrapUnique(new views::ShadowBorder(shadow)));
|
| Layout();
|
| @@ -333,8 +309,6 @@ bool SearchBoxView::OnMouseWheel(const ui::MouseWheelEvent& event) {
|
|
|
| void SearchBoxView::OnEnabledChanged() {
|
| search_box_->SetEnabled(enabled());
|
| - if (menu_button_)
|
| - menu_button_->SetEnabled(enabled());
|
| if (speech_button_)
|
| speech_button_->SetEnabled(enabled());
|
| }
|
| @@ -420,18 +394,6 @@ void SearchBoxView::ButtonPressed(views::Button* sender,
|
| NOTREACHED();
|
| }
|
|
|
| -void SearchBoxView::OnMenuButtonClicked(views::MenuButton* source,
|
| - const gfx::Point& point,
|
| - const ui::Event* event) {
|
| - if (!menu_)
|
| - menu_.reset(new AppListMenuViews(view_delegate_));
|
| -
|
| - const gfx::Point menu_location =
|
| - menu_button_->GetBoundsInScreen().bottom_right() +
|
| - gfx::Vector2d(kMenuXOffsetFromButton, kMenuYOffsetFromButton);
|
| - menu_->RunMenuAt(menu_button_, menu_location);
|
| -}
|
| -
|
| void SearchBoxView::IconChanged() {
|
| if (icon_view_)
|
| icon_view_->SetImage(model_->search_box()->icon());
|
|
|