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

Unified Diff: chrome/browser/chromeos/status_area_view.cc

Issue 383012: Fix for issue 27210, show bookmarks bar menu is out of sync with the browser's status. (Closed)
Patch Set: Created 11 years, 1 month 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 | « no previous file | views/controls/menu/native_menu_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status_area_view.cc
diff --git a/chrome/browser/chromeos/status_area_view.cc b/chrome/browser/chromeos/status_area_view.cc
index f880ab58c22d56e8e7c8735b6c042e235f74cbb6..dedbf5b8b0c06b75c6c44589ad0922c13ef0380a 100755
--- a/chrome/browser/chromeos/status_area_view.cc
+++ b/chrome/browser/chromeos/status_area_view.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/views/frame/browser_view.h"
#endif
#include "chrome/browser/profile.h"
+#include "chrome/common/pref_names.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -48,8 +49,7 @@ class OptionsMenuModel : public views::SimpleMenuModel,
CREATE_NEW_WINDOW = StatusAreaView::OPEN_TABS_ON_RIGHT + 1,
};
- explicit OptionsMenuModel(Browser* browser,
- views::SimpleMenuModel::Delegate* delegate)
+ explicit OptionsMenuModel(Browser* browser)
: SimpleMenuModel(this),
browser_(browser) {
#if defined(TOOLKIT_VIEWS)
@@ -235,7 +235,7 @@ void StatusAreaView::CreateAppMenu() {
if (app_menu_contents_.get())
return;
- options_menu_contents_.reset(new OptionsMenuModel(browser_, this));
+ options_menu_contents_.reset(new OptionsMenuModel(browser_));
app_menu_contents_.reset(new views::SimpleMenuModel(this));
app_menu_contents_->AddItemWithStringId(IDC_NEW_TAB, IDS_NEW_TAB);
@@ -277,6 +277,8 @@ void StatusAreaView::CreateAppMenu() {
}
bool StatusAreaView::IsCommandIdChecked(int command_id) const {
+ if (command_id == IDC_SHOW_BOOKMARK_BAR)
+ return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
return false;
}
« no previous file with comments | « no previous file | views/controls/menu/native_menu_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698