diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 08:19:13 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 08:19:13 +0000 |
commit | 270756a8deb80a7bf9d137b5ad08607e813b9527 (patch) | |
tree | 9ccca6a7491ea7db8c52d3911e626074547ad1af /chrome/browser/chromeos | |
parent | 7c7377aa746c05b3cfd0cb4b61c3514b7ea38d0f (diff) | |
download | chromium_src-270756a8deb80a7bf9d137b5ad08607e813b9527.zip chromium_src-270756a8deb80a7bf9d137b5ad08607e813b9527.tar.gz chromium_src-270756a8deb80a7bf9d137b5ad08607e813b9527.tar.bz2 |
Fix for issue 27210, show bookmarks bar menu is out of sync with the browser's status.
* Update the states of menu before showing menu like Window's menu does.
* Don't fire activate signal when the state is chagned via API.
* Eliminated UpdateStateData and replace it with the NativeMenuGtk and the position
stored in the gtk widget.
* Fixed StateAreaView to check bookmark bar status.
BUG=27210
TEST=Run linux builds (gtk/views/chromeos) check if the bookmark bar menu's status is in sync with the bookmark bar.
Review URL: http://codereview.chromium.org/383012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31654 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rwxr-xr-x | chrome/browser/chromeos/status_area_view.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/status_area_view.cc b/chrome/browser/chromeos/status_area_view.cc index f880ab5..dedbf5b 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; } |