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

Unified Diff: athena/content/web_activity.cc

Issue 513523002: Adding Baseframework of the ResourceManager (all hooks and observers) are being put in place with a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaaand another rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: athena/content/web_activity.cc
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index 95ddd35b862b73df8c402a4e2636263b6992e640..795c8c3f7bc0257ab101cb43b6d6f696a3493b03 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "ui/aura/window.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/focus/focus_manager.h"
@@ -346,7 +347,11 @@ Activity::ActivityState WebActivity::GetCurrentState() {
}
bool WebActivity::IsVisible() {
- return web_view_ && web_view_->IsDrawn();
+ return web_view_ &&
+ web_view_->IsDrawn() &&
+ current_state_ != ACTIVITY_UNLOADED &&
+ GetWindow() &&
+ GetWindow()->IsVisible();
}
Activity::ActivityMediaState WebActivity::GetMediaState() {

Powered by Google App Engine
This is Rietveld 408576698