Index: chrome/browser/ui/views/panels/panel_view.cc |
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc |
index 9775a2de76037edc08dd156748942d37f79553cf..42c71b42e134b80e33c29ccdc86f209e90968d47 100644 |
--- a/chrome/browser/ui/views/panels/panel_view.cc |
+++ b/chrome/browser/ui/views/panels/panel_view.cc |
@@ -14,13 +14,14 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "build/build_config.h" |
#include "chrome/app/chrome_command_ids.h" |
+#include "chrome/browser/lifetime/keep_alive_types.h" |
+#include "chrome/browser/lifetime/scoped_keep_alive.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/host_desktop.h" |
#include "chrome/browser/ui/panels/panel.h" |
#include "chrome/browser/ui/panels/panel_bounds_animation.h" |
#include "chrome/browser/ui/panels/panel_manager.h" |
#include "chrome/browser/ui/panels/stacked_panel_collection.h" |
-#include "chrome/browser/ui/views/auto_keep_alive.h" |
#include "chrome/browser/ui/views/panels/panel_frame_view.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/render_widget_host_view.h" |
@@ -300,8 +301,11 @@ PanelView::PanelView(Panel* panel, const gfx::Rect& bounds, bool always_on_top) |
window_->set_focus_on_creation(false); |
window_->AddObserver(this); |
+#if !defined(USE_ASH) |
// Prevent the browser process from shutting down while this window is open. |
- keep_alive_.reset(new AutoKeepAlive(GetNativePanelWindow())); |
+ // Chrome OS already has a mechanism to always stay alive and skips this. |
+ keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::PANEL_VIEW)); |
+#endif // !defined(USE_ASH) |
web_view_ = new views::WebView(NULL); |
AddChildView(web_view_); |