diff options
author | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 19:34:44 +0000 |
---|---|---|
committer | rockot@chromium.org <rockot@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 19:34:44 +0000 |
commit | c0c271b6a40225a489c74e89d7eb128194a3c1dc (patch) | |
tree | c60e32d4211ac3890328beff656b145ad23bfabc /apps | |
parent | 008026df321d960ebfbdb0e3d2dd6e1b0e622caf (diff) | |
download | chromium_src-c0c271b6a40225a489c74e89d7eb128194a3c1dc.zip chromium_src-c0c271b6a40225a489c74e89d7eb128194a3c1dc.tar.gz chromium_src-c0c271b6a40225a489c74e89d7eb128194a3c1dc.tar.bz2 |
Revert 227677 - Trigger visibilitychange events on app container state changes
Original CL: https://codereview.chromium.org/23473005/
BUG=312430
Review URL: https://codereview.chromium.org/54643005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/shell_window.cc | 13 | ||||
-rw-r--r-- | apps/shell_window.h | 5 | ||||
-rw-r--r-- | apps/ui/native_app_window.h | 3 |
3 files changed, 2 insertions, 19 deletions
diff --git a/apps/shell_window.cc b/apps/shell_window.cc index abed875..d37d481 100644 --- a/apps/shell_window.cc +++ b/apps/shell_window.cc @@ -139,8 +139,7 @@ ShellWindow::ShellWindow(Profile* profile, delegate_(delegate), image_loader_ptr_factory_(this), fullscreen_for_window_api_(false), - fullscreen_for_tab_(false), - is_content_visible_(false) { + fullscreen_for_tab_(false) { } void ShellWindow::Init(const GURL& url, @@ -300,16 +299,6 @@ void ShellWindow::OnNativeWindowChanged() { SaveWindowPosition(); if (shell_window_contents_ && native_app_window_) shell_window_contents_->NativeWindowChanged(native_app_window_.get()); - - bool was_content_visible = is_content_visible_; - NativeAppWindow* window = GetBaseWindow(); - if (window) { - is_content_visible_ = window->IsVisible() && !window->IsMinimized(); - if (was_content_visible && !is_content_visible_) - shell_window_contents_->GetWebContents()->WasHidden(); - else if (!was_content_visible && is_content_visible_) - shell_window_contents_->GetWebContents()->WasShown(); - } } void ShellWindow::OnNativeWindowActivated() { diff --git a/apps/shell_window.h b/apps/shell_window.h index 103eb1b..8e1eff2 100644 --- a/apps/shell_window.h +++ b/apps/shell_window.h @@ -254,7 +254,7 @@ class ShellWindow : public content::NotificationObserver, void OnNativeClose(); // Should be called by native implementations when the window size, position, - // minimized/maximized, or visibility state has changed. + // or minimized/maximized state has changed. void OnNativeWindowChanged(); // Should be called by native implementations when the window is activated. @@ -431,9 +431,6 @@ class ShellWindow : public content::NotificationObserver, // Fullscreen entered by HTML requestFullscreen. bool fullscreen_for_tab_; - // The window content is visible. - bool is_content_visible_; - // Size constraints on the window. SizeConstraints size_constraints_; diff --git a/apps/ui/native_app_window.h b/apps/ui/native_app_window.h index 37fbfbe..222a680 100644 --- a/apps/ui/native_app_window.h +++ b/apps/ui/native_app_window.h @@ -55,9 +55,6 @@ class NativeAppWindow : public ui::BaseWindow, // borders) and the content bounds, if any. virtual gfx::Insets GetFrameInsets() const = 0; - // Indicate whether or not the window is visible. - virtual bool IsVisible() const = 0; - // Hide or show this window as part of hiding or showing the app. // This may have different logic to Hide, Show, and ShowInactive as those are // called via the AppWindow javascript API. |