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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix comment Created 4 years, 2 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/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 91f8d57b4458b5040e35a60b4b31119fd9f96800..3f1125812a38763f40b09753aae236967367b1dd 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -77,12 +77,10 @@
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
#include "chrome/browser/ui/ash/vpn_delegate_chromeos.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/singleton_tabs.h"
-#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -102,7 +100,6 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
-#include "content/public/browser/web_contents.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -401,27 +398,6 @@ void SystemTrayDelegateChromeOS::ShowSetTimeDialog() {
SetTimeDialog::ShowDialog(GetNativeWindow());
}
-bool SystemTrayDelegateChromeOS::ShouldShowDisplayNotification() {
- // 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.
- // TODO(mukai): fix this.
- Browser* active_browser = chrome::FindLastActive();
- if (!active_browser)
- return true;
-
- content::WebContents* active_contents =
- active_browser->tab_strip_model()->GetActiveWebContents();
- if (!active_contents)
- return true;
-
- GURL visible_url = active_contents->GetLastCommittedURL();
- return !chrome::IsSettingsSubPage(
- visible_url, SystemTrayClient::kDisplaySettingsSubPageName) &&
- !chrome::IsSettingsSubPage(
- visible_url,
- SystemTrayClient::kDisplayOverscanSettingsSubPageName);
-}
-
void SystemTrayDelegateChromeOS::ShowEnterpriseInfo() {
// TODO(mash): Refactor out SessionStateDelegate and move to SystemTrayClient.
ash::LoginStatus status = GetUserLoginStatus();

Powered by Google App Engine
This is Rietveld 408576698