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

Unified Diff: content/browser/renderer_host/render_widget_host_view_base_observer.h

Issue 1711103002: Implement lifetime observer on RenderWidgetHostViewBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to r378132. Created 4 years, 10 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: content/browser/renderer_host/render_widget_host_view_base_observer.h
diff --git a/content/browser/renderer_host/render_widget_host_view_base_observer.h b/content/browser/renderer_host/render_widget_host_view_base_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..acd3882fc02389f5cd7ba9afb80eff64bdf04def
--- /dev/null
+++ b/content/browser/renderer_host/render_widget_host_view_base_observer.h
@@ -0,0 +1,32 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_OBSERVER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_OBSERVER_H_
+
+#include "base/macros.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class RenderWidgetHostViewBase;
+
+class CONTENT_EXPORT RenderWidgetHostViewBaseObserver {
+ public:
+ // All derived classes must de-register as observers when receiving this
+ // notification.
+ virtual void OnRenderWidgetHostViewBaseDestroyed(
+ RenderWidgetHostViewBase* view);
+
+ protected:
+ RenderWidgetHostViewBaseObserver() = default;
+ virtual ~RenderWidgetHostViewBaseObserver();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBaseObserver);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698