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

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: Trying again after rebase master. 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
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index 8c5ff9d54bb8535817bfcdbb080d5fc3dd4495c4..78bbdb056ac96e35b81e5c915475d2610369ef90 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"
@@ -66,6 +67,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_; }
@@ -135,7 +137,8 @@ class SearchBox : public content::RenderViewObserver,
bool verbatim,
size_t selection_start,
size_t selection_end);
- void OnKeyCaptureChange(bool is_key_capture_enabled);
+ void OnFocusChanged(OmniboxFocusState new_focus_state,
+ OmniboxFocusChangeReason reason);
void OnSetDisplayInstantResults(bool display_instant_results);
void OnThemeChanged(const ThemeBackgroundInfo& theme_info);
void OnThemeAreaHeightChanged(int height);
@@ -160,6 +163,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_;
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698