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

Unified Diff: chrome/browser/ui/search/search_tab_helper.h

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build break Created 7 years, 9 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/browser/ui/search/search_model_observer.h ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper.h
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h
index 7034705ffa37743f140a3e564cc11229e2780517..e575dc2cb2f051b22eb6fb2de90cab916d449bb1 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -10,6 +10,7 @@
#include "chrome/browser/ui/search/search_model.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
namespace content {
@@ -22,6 +23,7 @@ namespace search {
// Per-tab search "helper". Acts as the owner and controller of the tab's
// search UI model.
class SearchTabHelper : public content::NotificationObserver,
+ public content::WebContentsObserver,
public content::WebContentsUserData<SearchTabHelper> {
public:
virtual ~SearchTabHelper();
@@ -50,8 +52,16 @@ class SearchTabHelper : public content::NotificationObserver,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // Overridden from contents::WebContentsObserver:
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
// Sets the mode of the model based on the current URL of web_contents().
- void UpdateModel();
+ void UpdateMode();
+
+ // Handlers for SearchBox API to show and hide top bars (bookmark and info
+ // bars).
+ void OnSearchBoxShowBars(int page_id);
+ void OnSearchBoxHideBars(int page_id);
const bool is_search_enabled_;
« no previous file with comments | « chrome/browser/ui/search/search_model_observer.h ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698