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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 void SystemTrayDelegateChromeOS::ShowChromeSlow() { 486 void SystemTrayDelegateChromeOS::ShowChromeSlow() {
487 chrome::ScopedTabbedBrowserDisplayer displayer( 487 chrome::ScopedTabbedBrowserDisplayer displayer(
488 ProfileManager::GetPrimaryUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); 488 ProfileManager::GetPrimaryUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH);
489 chrome::ShowSlow(displayer.browser()); 489 chrome::ShowSlow(displayer.browser());
490 } 490 }
491 491
492 bool SystemTrayDelegateChromeOS::ShouldShowDisplayNotification() { 492 bool SystemTrayDelegateChromeOS::ShouldShowDisplayNotification() {
493 // Packaged app is not counted as 'last active', so if a browser opening the 493 // Packaged app is not counted as 'last active', so if a browser opening the
494 // display settings is in background of a packaged app, it will return true. 494 // display settings is in background of a packaged app, it will return true.
495 // TODO(mukai): fix this. 495 // TODO(mukai): fix this.
496 Browser* active_browser = 496 Browser* active_browser = chrome::FindLastActive();
497 chrome::FindLastActiveWithHostDesktopType(chrome::HOST_DESKTOP_TYPE_ASH);
498 if (!active_browser) 497 if (!active_browser)
499 return true; 498 return true;
500 499
501 content::WebContents* active_contents = 500 content::WebContents* active_contents =
502 active_browser->tab_strip_model()->GetActiveWebContents(); 501 active_browser->tab_strip_model()->GetActiveWebContents();
503 if (!active_contents) 502 if (!active_contents)
504 return true; 503 return true;
505 504
506 GURL visible_url = active_contents->GetLastCommittedURL(); 505 GURL visible_url = active_contents->GetLastCommittedURL();
507 return !(chrome::IsSettingsSubPage(visible_url, 506 return !(chrome::IsSettingsSubPage(visible_url,
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1327 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1329 << "ENABLE_SUPERVISED_USERS undefined."; 1328 << "ENABLE_SUPERVISED_USERS undefined.";
1330 return base::string16(); 1329 return base::string16();
1331 } 1330 }
1332 1331
1333 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1332 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1334 return new SystemTrayDelegateChromeOS(); 1333 return new SystemTrayDelegateChromeOS();
1335 } 1334 }
1336 1335
1337 } // namespace chromeos 1336 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698