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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 22654003: Create system tray item for accessing chrome://slow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix non-chromeos build Created 7 years, 4 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 | « ash/system/tray/test_system_tray_delegate.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 1810a55e35e0ff0df4405a3477c9f6d8ab207ad2..eb0b9a771a7fe55d409f29bac0c3557221594ed7 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -72,6 +72,7 @@
#include "chrome/browser/chromeos/system/timezone_settings.h"
#include "chrome/browser/chromeos/system_key_event_listener.h"
#include "chrome/browser/drive/drive_service_interface.h"
+#include "chrome/browser/feedback/tracing_manager.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/policy/browser_policy_connector.h"
@@ -503,6 +504,10 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
kDisplaySettingsSubPageName);
}
+ virtual void ShowChromeSlow() OVERRIDE {
+ chrome::ShowSlow(GetAppropriateBrowser());
+ }
+
virtual bool ShouldShowDisplayNotification() OVERRIDE {
// Packaged app is not counted as 'last active', so if a browser opening the
// display settings is in background of a packaged app, it will return true.
@@ -928,9 +933,14 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
base::Bind(&SystemTrayDelegate::OnAccessibilityModeChanged,
base::Unretained(this),
ash::A11Y_NOTIFICATION_NONE));
+ user_pref_registrar_->Add(
+ prefs::kPerformanceTracingEnabled,
+ base::Bind(&SystemTrayDelegate::UpdatePerformanceTracing,
+ base::Unretained(this)));
UpdateClockType();
UpdateShowLogoutButtonInTray();
+ UpdatePerformanceTracing();
search_key_mapped_to_ =
profile->GetPrefs()->GetInteger(prefs::kLanguageRemapSearchKeyTo);
}
@@ -1147,6 +1157,15 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(notify);
}
+ void UpdatePerformanceTracing() {
+ if (!user_pref_registrar_)
+ return;
+ bool value =
+ user_pref_registrar_->prefs()->GetBoolean(
+ prefs::kPerformanceTracingEnabled);
+ GetSystemTrayNotifier()->NotifyTracingModeChanged(value);
+ }
+
// Overridden from InputMethodManager::Observer.
virtual void InputMethodChanged(
input_method::InputMethodManager* manager, bool show_message) OVERRIDE {
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | chrome/browser/ui/chrome_pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698