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

Unified Diff: chrome/renderer/searchbox/searchbox.h

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent issues. Created 7 years, 7 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
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index 441994ba3d30850bdc8d54c39ed85914caa3d88b..7603a7ee6a5b30dd1a63025102bb7954f3fd821b 100644
--- a/chrome/renderer/searchbox/searchbox.h
+++ b/chrome/renderer/searchbox/searchbox.h
@@ -11,6 +11,7 @@
#include "base/string16.h"
#include "chrome/common/instant_restricted_id_cache.h"
#include "chrome/common/instant_types.h"
+#include "chrome/common/omnibox_focus_state.h"
#include "chrome/common/search_types.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/renderer/render_view_observer.h"
@@ -65,6 +66,7 @@ class SearchBox : public content::RenderViewObserver,
bool query_is_restricted() const { return query_is_restricted_; }
size_t selection_start() const { return selection_start_; }
size_t selection_end() const { return selection_end_; }
+ bool is_focused() const { return is_focused_; }
bool is_key_capture_enabled() const { return is_key_capture_enabled_; }
bool display_instant_results() const { return display_instant_results_; }
const string16& omnibox_font() const { return omnibox_font_; }
@@ -134,7 +136,8 @@ class SearchBox : public content::RenderViewObserver,
bool verbatim,
size_t selection_start,
size_t selection_end);
- void OnKeyCaptureChange(bool is_key_capture_enabled);
+ void OnFocusChange(OmniboxFocusState new_focus_state,
+ OmniboxFocusChangeReason reason);
void OnSetDisplayInstantResults(bool display_instant_results);
void OnThemeChanged(const ThemeBackgroundInfo& theme_info);
void OnThemeAreaHeightChanged(int height);
@@ -159,6 +162,7 @@ class SearchBox : public content::RenderViewObserver,
size_t selection_end_;
int start_margin_;
gfx::Rect popup_bounds_;
+ bool is_focused_;
bool is_key_capture_enabled_;
ThemeBackgroundInfo theme_info_;
bool display_instant_results_;

Powered by Google App Engine
This is Rietveld 408576698