diff options
author | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 09:03:35 +0000 |
---|---|---|
committer | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 09:03:35 +0000 |
commit | c461bb6ed69a9bab964f8c9124a7f6b8f159d5d0 (patch) | |
tree | 0871f4a10260305ed04e2f4a08e54f4fc74cf7a1 /apps/app_window.cc | |
parent | 55f3f384aa2880607df5e4ceb7ff08c878cd9aa7 (diff) | |
download | chromium_src-c461bb6ed69a9bab964f8c9124a7f6b8f159d5d0.zip chromium_src-c461bb6ed69a9bab964f8c9124a7f6b8f159d5d0.tar.gz chromium_src-c461bb6ed69a9bab964f8c9124a7f6b8f159d5d0.tar.bz2 |
Revert of Make hidden app windows have no shelf presence [ChromeOS]. (https://codereview.chromium.org/234673002/)
Reason for revert:
Revert to reland in more merge-able chunks. See crbug.com/360896
for details.
Original issue's description:
> Make hidden app windows have no shelf presence [ChromeOS].
>
> This CL fixes an issue with hidden app windows appearing in the shelf by
> unregistering the app windows when they are hidden and registering them
> again when shown.
>
> Window visibility wasn't enough here as the window is not visible
> if it is minimized.
>
> This CL adds OnAppWindowShown() and OnAppWindowHidden() methods to
> AppWindowObserver.
>
> BUG=360896
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265903
TBR=stevenjb@chromium.org, benwells@chromium.org, skuhne@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/262723003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_window.cc')
-rw-r--r-- | apps/app_window.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/apps/app_window.cc b/apps/app_window.cc index cfb1213..efe31d2 100644 --- a/apps/app_window.cc +++ b/apps/app_window.cc @@ -280,11 +280,7 @@ void AppWindow::Init(const GURL& url, native_app_window_.reset(delegate_->CreateNativeAppWindow(this, new_params)); - if (new_params.hidden) { - // Although the window starts hidden by default, calling Hide() here - // notifies observers of the window being hidden. - Hide(); - } else { + if (!new_params.hidden) { // Panels are not activated by default. Show(window_type_is_panel() || !new_params.focused ? SHOW_INACTIVE : SHOW_ACTIVE); @@ -676,7 +672,6 @@ void AppWindow::Show(ShowType show_type) { GetBaseWindow()->ShowInactive(); break; } - AppWindowRegistry::Get(browser_context_)->AppWindowShown(this); } void AppWindow::Hide() { @@ -686,7 +681,6 @@ void AppWindow::Hide() { // show will not be delayed. show_on_first_paint_ = false; GetBaseWindow()->Hide(); - AppWindowRegistry::Get(browser_context_)->AppWindowHidden(this); } void AppWindow::SetAlwaysOnTop(bool always_on_top) { |