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

Unified Diff: chrome/browser/tab_contents/web_contents_view_mac.h

Issue 20334: Sad Tab view for the Mac. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/cocoa/sad_tab_view.mm ('k') | chrome/browser/tab_contents/web_contents_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/web_contents_view_mac.h
===================================================================
--- chrome/browser/tab_contents/web_contents_view_mac.h (revision 9874)
+++ chrome/browser/tab_contents/web_contents_view_mac.h (working copy)
@@ -10,8 +10,10 @@
#include "base/gfx/size.h"
#include "base/scoped_cftyperef.h"
#include "chrome/browser/tab_contents/web_contents_view.h"
+#include "chrome/common/notification_registrar.h"
class FindBarMac;
+@class SadTabView;
@interface WebContentsViewCocoa : NSView {
}
@@ -20,7 +22,8 @@
// Mac-specific implementation of the WebContentsView. It owns an NSView that
// contains all of the contents of the tab and associated child views.
-class WebContentsViewMac : public WebContentsView {
+class WebContentsViewMac : public WebContentsView,
+ public NotificationObserver {
public:
// The corresponding WebContents is passed in the constructor, and manages our
// lifetime. This doesn't need to be the case, but is this way currently
@@ -70,6 +73,12 @@
int active_match_ordinal,
bool final_update);
+ // NotificationObserver implementation ---------------------------------------
+
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
// ---------------------------------------------------------------------------
@@ -82,6 +91,13 @@
// non-NULL, it may or may not be visible.
scoped_ptr<FindBarMac> find_bar_;
+ // Used to get notifications about renderers coming and going.
+ NotificationRegistrar registrar_;
+
+ // Used to render the sad tab. This will be non-NULL only when the sad tab is
+ // visible.
+ scoped_cftyperef<SadTabView*> sad_tab_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac);
};
« no previous file with comments | « chrome/browser/cocoa/sad_tab_view.mm ('k') | chrome/browser/tab_contents/web_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698