Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / omnibox / omnibox_view_views.h
index 26a4719..5f80356 100644 (file)
@@ -5,10 +5,12 @@
 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
 
+#include <set>
 #include <string>
 
 #include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/omnibox/omnibox_view.h"
 #include "chrome/browser/ui/toolbar/toolbar_model.h"
 #include "ui/base/window_open_disposition.h"
@@ -67,6 +69,7 @@ class OmniboxViewViews
   virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE;
   virtual void OnTabChanged(const content::WebContents* web_contents) OVERRIDE;
   virtual void Update() OVERRIDE;
+  virtual void UpdatePlaceholderText() OVERRIDE;
   virtual base::string16 GetText() const OVERRIDE;
   virtual void SetUserText(const base::string16& text,
                            const base::string16& display_text,
@@ -107,6 +110,11 @@ class OmniboxViewViews
   // Handle keyword hint tab-to-search and tabbing through dropdown results.
   bool HandleEarlyTabActions(const ui::KeyEvent& event);
 
+  // Handles a request to change the value of this text field from software
+  // using an accessibility API (typically automation software, screen readers
+  // don't normally use this). Sets the value and clears the selection.
+  void AccessibilitySetValue(const base::string16& new_value);
+
   // OmniboxView:
   virtual void SetWindowTextAndCaretPos(const base::string16& text,
                                         size_t caret_pos,
@@ -134,8 +142,7 @@ class OmniboxViewViews
   virtual bool IsImeShowingPopup() const OVERRIDE;
   virtual void ShowImeIfNeeded() OVERRIDE;
   virtual void OnMatchOpened(const AutocompleteMatch& match,
-                             Profile* profile,
-                             content::WebContents* web_contents) const OVERRIDE;
+                             content::WebContents* web_contents) OVERRIDE;
   virtual int GetOmniboxTextLength() const OVERRIDE;
   virtual void EmphasizeURLComponents() OVERRIDE;
 
@@ -222,6 +229,9 @@ class OmniboxViewViews
   // and gets a tap. So we use this variable to remember focus state before tap.
   bool select_all_on_gesture_tap_;
 
+  // Used to bind callback functions to this object.
+  base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
 };