diff options
author | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 21:53:21 +0000 |
---|---|---|
committer | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 21:53:21 +0000 |
commit | 8f471efe17352dd8d4831f97f5f5c03812b6f082 (patch) | |
tree | 45e4f92e4062991ad772a4386e6c250f4d36415d /apps/app_window.cc | |
parent | 1dca97bbf3d4c109ae93be900cf6823dc87c154f (diff) | |
download | chromium_src-8f471efe17352dd8d4831f97f5f5c03812b6f082.zip chromium_src-8f471efe17352dd8d4831f97f5f5c03812b6f082.tar.gz chromium_src-8f471efe17352dd8d4831f97f5f5c03812b6f082.tar.bz2 |
Reland a portion of https://codereview.chromium.org/234673002/
This CL is a reland of a portion of https://codereview.chromium.org/234673002/
with all changes #ifdefed for ChromeOS only. This will allow for a ChromeOS
only merge of the fix.
BUG=360896
TBR=stevenjb@chromium.org, skuhne@chromium.org
Review URL: https://codereview.chromium.org/269613003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_window.cc')
-rw-r--r-- | apps/app_window.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/app_window.cc b/apps/app_window.cc index cf20eea..113d8ee 100644 --- a/apps/app_window.cc +++ b/apps/app_window.cc @@ -284,6 +284,12 @@ void AppWindow::Init(const GURL& url, // Panels are not activated by default. Show(window_type_is_panel() || !new_params.focused ? SHOW_INACTIVE : SHOW_ACTIVE); +#if defined(OS_CHROMEOS) + } else { + // Although the window starts hidden by default, calling Hide() here + // notifies observers of the window being hidden. + Hide(); +#endif } if (new_params.state == ui::SHOW_STATE_FULLSCREEN) @@ -672,6 +678,9 @@ void AppWindow::Show(ShowType show_type) { GetBaseWindow()->ShowInactive(); break; } +#if defined(OS_CHROMEOS) + AppWindowRegistry::Get(browser_context_)->AppWindowShown(this); +#endif } void AppWindow::Hide() { @@ -681,6 +690,9 @@ void AppWindow::Hide() { // show will not be delayed. show_on_first_paint_ = false; GetBaseWindow()->Hide(); +#if defined(OS_CHROMEOS) + AppWindowRegistry::Get(browser_context_)->AppWindowHidden(this); +#endif } void AppWindow::SetAlwaysOnTop(bool always_on_top) { |