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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 11876036: Alternate NTP: Don't hide bookmark bar on instant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 7 years, 11 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/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 392d35e3d98b408f76ecf93e51438f4121b358d5..2b25b0af8a2203e457ac22884ee2e9b3b050f7e8 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -43,6 +43,7 @@
#import "chrome/browser/ui/cocoa/web_dialog_window_controller.h"
#import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
#include "chrome/browser/ui/page_info_bubble.h"
+#include "chrome/browser/ui/search/search_model.h"
#include "chrome/browser/ui/web_applications/web_app_ui.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_notification_types.h"
@@ -115,9 +116,12 @@ BrowserWindowCocoa::BrowserWindowCocoa(Browser* browser,
chrome::GetSavedWindowBoundsAndShowState(browser_,
&bounds,
&initial_show_state_);
+
+ browser_->search_model()->AddObserver(this);
}
BrowserWindowCocoa::~BrowserWindowCocoa() {
+ browser_->search_model()->RemoveObserver(this);
}
void BrowserWindowCocoa::Show() {
@@ -649,6 +653,12 @@ extensions::ActiveTabPermissionGranter*
return tab_helper ? tab_helper->active_tab_permission_granter() : NULL;
}
+void BrowserWindowCocoa::ModeChanged(
+ const chrome::search::Mode& old_mode,
+ const chrome::search::Mode& new_mode) {
+ [controller_ updateBookmarkBarStateForInstantPreview];
+}
+
void BrowserWindowCocoa::DestroyBrowser() {
[controller_ destroyBrowser];

Powered by Google App Engine
This is Rietveld 408576698