summaryrefslogtreecommitdiffstats
path: root/apps/app_lifetime_monitor.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace more ObserverList with base::ObserverList.brettw2015-06-031-1/+1
| | | | | | | | | | | | This is everything but the chrome directory CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=zelidrag@chromium.org (chromeos) TBR=keybuk@chromium.org (device/bluetooth) Review URL: https://codereview.chromium.org/1162943002 Cr-Commit-Position: refs/heads/master@{#332626}
* Don't fire AppLifetimeMonitor::Observer::OnAppActivated on every ↵jackhou2014-11-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | AppWindow::Show. The previous logic in AppLifetimeMonitor::OnAppWindowShown causes OnAppActivated to be fired whenever a window is shown. With this change, it will only fire when the first non-visible window becomes visible. This includes http://crrev.com/699363002 but passes |was_hidden| insetad of AppWindow::ShowType. BUG=410435 TEST=Create two windows using the Window State Sample app: https://chrome.google.com/webstore/detail/window-state-sample/hcbhfbnaaancmblfhdknlnojpafjohbi On one of the windows, set a delay of a few seconds, then click "Show". Focus a non-Chrome window so that both app windows are obscured. After the delay, only one app window should be brought to the front. Review URL: https://codereview.chromium.org/705173003 Cr-Commit-Position: refs/heads/master@{#304144}
* Standardize usage of virtual/override/final in apps/dcheng2014-10-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Google C++ style guide states: Explicitly annotate overrides of virtual functions or virtual destructors with an override or (less frequently) final specifier. Older (pre-C++11) code will use the virtual keyword as an inferior alternative annotation. For clarity, use exactly one of override, final, or virtual when declaring an override. To better conform to these guidelines, the following constructs have been rewritten: - if a base class has a virtual destructor, then: virtual ~Foo(); -> ~Foo() override; - virtual void Foo() override; -> void Foo() override; - virtual void Foo() override final; -> void Foo() final; This patch was automatically generated. The clang plugin can generate fixit hints, which are suggested edits when it is 100% sure it knows how to fix a problem. The hints from the clang plugin were applied to the source tree using the tool in https://codereview.chromium.org/598073004. BUG=417463 R=scheib@chromium.org Review URL: https://codereview.chromium.org/666213002 Cr-Commit-Position: refs/heads/master@{#300609}
* Replace OVERRIDE and FINAL with override and final in src/appsanand.ratn2014-10-091-5/+5
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/641963002 Cr-Commit-Position: refs/heads/master@{#298808}
* Move AppWindow to extensionshashimoto2014-08-291-7/+7
| | | | | | | | | | | | | Move AppWindow, AppWindowRegistry and AppsClient from apps/ to extensions/browser/app_window Change the namespace from apps to extensions. Fix GYP and DEPS. BUG=403726 TBR=sky@chromium.org for include and namespace changes Review URL: https://codereview.chromium.org/494033002 Cr-Commit-Position: refs/heads/master@{#292599}
* Disable ephemeral apps after they stop runningtmdiep@chromium.org2014-08-061-7/+6
| | | | | | | | | | | | | | | | Ephemeral apps are unloaded and disabled after they stop running to ensure that they have no background activity while they are cached. The event router, message service and message center no longer need special handling for idle ephemeral apps. BUG=339001,358052 TEST=browser_tests TBR=dewittj@chromium.org (for removal of code in message_center_settings_controller.cc) Review URL: https://codereview.chromium.org/344543006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287705 0039d316-1c4b-4281-b951-d872f2087c98
* Don't send onLaunched to apps with only hidden windows when they reload.benwells@chromium.org2014-05-151-1/+4
| | | | | | | | | | | | This also stops apps with only hidden windows getting sent the onLaunched if they don't listen to onRestarted and the system is restarted. BUG=268755 Review URL: https://codereview.chromium.org/270273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270614 0039d316-1c4b-4281-b951-d872f2087c98
* Add default implementations for AppWindowRegistry::Observer notifications.calamity@chromium.org2014-05-071-1/+0
| | | | | | | | | | | | | | | This CL adds default implementations for AppWindowRegistry notifications as suggested in https://codereview.chromium.org/234673002. This allows observers to avoid writing their own empty implementations of unwanted notifications. BUG=363470 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/236363011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268890 0039d316-1c4b-4281-b951-d872f2087c98
* Move clients of BrowserContextKeyedService to using KeyedService (#3)blundell@chromium.org2014-03-131-3/+3
| | | | | | | | | | | | | | | | | This CL moves the following clients of BCKS to using the KeyedService component: - //apps - //chrome/browser/apps - //chrome/browser/chromeos - //chrome/browser/managed_mode BUG=351704 TBR=yoz,jochen Review URL: https://codereview.chromium.org/197733002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256756 0039d316-1c4b-4281-b951-d872f2087c98
* Rename apps::ShellWindow to apps::AppWindowjamescook@chromium.org2014-02-151-6/+6
| | | | | | | | | | | | | | | | | | | * Rename ShellWindowRegistry * Rename ShellWindowGeometryCache * Rename members like shell_window_ to app_window_ * Rename locals like shell_window to app_window BUG=343591 TEST=compiles COLLABORATOR=scheib@chromium.org TBR=skuhne@chromium.org for chrome/browser/ui/ash/launcher TBR=thakis@chromium.org for chrome/browser/ui/cocoa TBR=erg@chromium.org for chrome/browser/ui/gtk TBR=sky@chromium.org for chrome/test Review URL: https://codereview.chromium.org/166573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251542 0039d316-1c4b-4281-b951-d872f2087c98
* Move ShellWindowRegistry to appsbenwells@chromium.org2013-08-091-3/+3
| | | | | | | | | | TBR=sky BUG=159366 Review URL: https://chromiumcodereview.appspot.com/22642008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216658 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out AppLifetimeMonitor.jackhou@chromium.org2013-06-181-0/+87
| | | | | | | | | | | | | | | | | AppLifetimeMonitor listens to extension host notifications and observes ShellWindowRegistry. It sends out notifications when: - an app starts - the first shell window opens - the last shell window closes - the app stops BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204487 Review URL: https://chromiumcodereview.appspot.com/16412002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206988 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 204487 "Factor out AppLifetimeMonitor."mad@chromium.org2013-06-061-82/+0
| | | | | | | | | | | | | | | | | | | | | | | Was causing BrowserCommandControllerTest.IncognitoModeOnSigninAllowedPrefChange to crash. > Factor out AppLifetimeMonitor. > > AppLifetimeMonitor listens to extension host notifications and observes > ShellWindowRegistry. It sends out notifications when: > - an app starts > - the first shell window opens > - the last shell window closes > - the app stops > > BUG= > > Review URL: https://chromiumcodereview.appspot.com/16412002 TBR=jackhou@chromium.org Review URL: https://codereview.chromium.org/16554002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204495 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out AppLifetimeMonitor.jackhou@chromium.org2013-06-061-0/+82
AppLifetimeMonitor listens to extension host notifications and observes ShellWindowRegistry. It sends out notifications when: - an app starts - the first shell window opens - the last shell window closes - the app stops BUG= Review URL: https://chromiumcodereview.appspot.com/16412002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204487 0039d316-1c4b-4281-b951-d872f2087c98