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

Unified Diff: chrome/browser/notifications/balloon_host.h

Issue 6010004: Refactor RenderWidgetHost::set_paint_observer() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove helper classes per review Created 9 years, 11 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: chrome/browser/notifications/balloon_host.h
diff --git a/chrome/browser/notifications/balloon_host.h b/chrome/browser/notifications/balloon_host.h
index 358cb619696312408dc7054d16ac95e6393c7811..98da5ba22ec11813c1600bd01d93cd0b6bc8764c 100644
--- a/chrome/browser/notifications/balloon_host.h
+++ b/chrome/browser/notifications/balloon_host.h
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
+#include "chrome/common/notification_registrar.h"
class Balloon;
class Browser;
@@ -22,7 +23,8 @@ struct WebPreferences;
class BalloonHost : public RenderViewHostDelegate,
public RenderViewHostDelegate::View,
- public ExtensionFunctionDispatcher::Delegate {
+ public ExtensionFunctionDispatcher::Delegate,
+ public NotificationObserver {
public:
explicit BalloonHost(Balloon* balloon);
@@ -59,6 +61,12 @@ class BalloonHost : public RenderViewHostDelegate,
virtual RenderViewHostDelegate::View* GetViewDelegate();
virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params);
+ // NotificationObserver override.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+
// RenderViewHostDelegate::View methods. Only the ones for opening new
// windows are currently implemented.
virtual void CreateNewWindow(
@@ -112,9 +120,6 @@ class BalloonHost : public RenderViewHostDelegate,
const std::string& value);
virtual void ClearInspectorSettings();
- // Called when the render view has painted.
- void RenderWidgetHostDidPaint();
-
protected:
virtual ~BalloonHost();
// Must override in platform specific implementations.
@@ -152,6 +157,8 @@ class BalloonHost : public RenderViewHostDelegate,
// A flag to enable DOM UI.
bool enable_dom_ui_;
+
+ NotificationRegistrar registrar_;
};
#endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698