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

Unified Diff: chrome/browser/ui/views/frame/system_menu_model_delegate.cc

Issue 146363002: Linux Aura: Use system title bar is now set by preference, not flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename BrowserView pref registration functions. Created 6 years, 10 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/views/frame/system_menu_model_builder.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/system_menu_model_delegate.cc
diff --git a/chrome/browser/ui/views/frame/system_menu_model_delegate.cc b/chrome/browser/ui/views/frame/system_menu_model_delegate.cc
index 0bfc61ad767c5141f86c07be005e8d7a0ef369ac..81bad9dd98657a829ccb91bfa374a128405d891e 100644
--- a/chrome/browser/ui/views/frame/system_menu_model_delegate.cc
+++ b/chrome/browser/ui/views/frame/system_menu_model_delegate.cc
@@ -4,11 +4,14 @@
#include "chrome/browser/ui/views/frame/system_menu_model_delegate.h"
+#include "base/prefs/pref_service.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/command_updater.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -23,9 +26,14 @@ SystemMenuModelDelegate::~SystemMenuModelDelegate() {
}
bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const {
- // TODO(beng): encoding menu.
- // No items in our system menu are check-able.
- return false;
+ switch (command_id) {
+ case IDC_USE_SYSTEM_TITLE_BAR: {
+ PrefService* prefs = browser_->profile()->GetPrefs();
+ return !prefs->GetBoolean(prefs::kUseCustomChromeFrame);
+ }
+ default:
+ return false;
+ }
}
bool SystemMenuModelDelegate::IsCommandIdEnabled(int command_id) const {
« no previous file with comments | « chrome/browser/ui/views/frame/system_menu_model_builder.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698