Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / find_bar_view.h
index 7c41f36..8382b02 100644 (file)
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_VIEWS_FIND_BAR_VIEW_H_
 
 #include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/views/dropdown_bar_view.h"
 #include "ui/views/controls/button/button.h"
@@ -19,7 +20,7 @@ namespace views {
 class ImageButton;
 class Label;
 class MouseEvent;
-class View;
+class Painter;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -41,7 +42,7 @@ class FindBarView : public DropdownBarView,
   };
 
   explicit FindBarView(FindBarHost* host);
-  virtual ~FindBarView();
+  ~FindBarView() override;
 
   // Accessors for the text and selection displayed in the text box.
   void SetFindTextAndSelectedRange(const base::string16& find_text,
@@ -64,22 +65,21 @@ class FindBarView : public DropdownBarView,
   void ClearMatchCount();
 
   // Claims focus for the text field and selects its contents.
-  virtual void SetFocusAndSelection(bool select_all) OVERRIDE;
+  void SetFocusAndSelection(bool select_all) override;
 
   // views::View:
-  virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
-  virtual void Layout() OVERRIDE;
-  virtual gfx::Size GetPreferredSize() OVERRIDE;
+  void OnPaint(gfx::Canvas* canvas) override;
+  void Layout() override;
+  gfx::Size GetPreferredSize() const override;
 
   // views::ButtonListener:
-  virtual void ButtonPressed(views::Button* sender,
-                             const ui::Event& event) OVERRIDE;
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
   // views::TextfieldController:
-  virtual bool HandleKeyEvent(views::Textfield* sender,
-                              const ui::KeyEvent& key_event) OVERRIDE;
-  virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE;
-  virtual void OnAfterPaste() OVERRIDE;
+  bool HandleKeyEvent(views::Textfield* sender,
+                      const ui::KeyEvent& key_event) override;
+  void OnAfterUserAction(views::Textfield* sender) override;
+  void OnAfterPaste() override;
 
  private:
   // Starts finding |search_text|.  If the text is empty, stops finding.
@@ -89,7 +89,7 @@ class FindBarView : public DropdownBarView,
   void UpdateMatchCountAppearance(bool no_match);
 
   // views::View:
-  virtual void OnThemeChanged() OVERRIDE;
+  void OnThemeChanged() override;
 
   // We use a hidden view to grab mouse clicks and bring focus to the find
   // text box. This is because although the find text box may look like it
@@ -104,7 +104,7 @@ class FindBarView : public DropdownBarView,
       : view_to_focus_on_mousedown_(view_to_focus_on_mousedown) {}
 
    private:
-    virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
+    bool OnMousePressed(const ui::MouseEvent& event) override;
 
     views::Textfield* view_to_focus_on_mousedown_;
 
@@ -121,6 +121,7 @@ class FindBarView : public DropdownBarView,
 
   // The controls in the window.
   views::Textfield* find_text_;
+  scoped_ptr<views::Painter> find_text_border_;
   views::Label* match_count_text_;
   FocusForwarderView* focus_forwarder_view_;
   views::ImageButton* find_previous_button_;
@@ -130,13 +131,6 @@ class FindBarView : public DropdownBarView,
   // The preferred height of the find bar.
   int preferred_height_;
 
-  // The background image for the Find text box, which we draw behind the Find
-  // box to provide the Chrome look to the edge of the text box.
-  const gfx::ImageSkia* text_box_background_;
-
-  // The rounded edge on the left side of the Find text box.
-  const gfx::ImageSkia* text_box_background_left_;
-
   DISALLOW_COPY_AND_ASSIGN(FindBarView);
 };