summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 16:10:12 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 16:10:12 +0000
commit0ba51ade0bb502ec0df484b2ff09bafb03ffc9a8 (patch)
treecdc6e25366ea426ad9a400c07d1d700081897ab1 /chrome/browser
parent08ef57cee967ce148d209070b398a6979808b3c4 (diff)
downloadchromium_src-0ba51ade0bb502ec0df484b2ff09bafb03ffc9a8.zip
chromium_src-0ba51ade0bb502ec0df484b2ff09bafb03ffc9a8.tar.gz
chromium_src-0ba51ade0bb502ec0df484b2ff09bafb03ffc9a8.tar.bz2
Updating to use scoped_nsobject.
Review URL: http://codereview.chromium.org/52017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/tab_contents/web_contents_view_mac.h6
-rw-r--r--chrome/browser/tab_contents/web_contents_view_mac.mm6
2 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/tab_contents/web_contents_view_mac.h b/chrome/browser/tab_contents/web_contents_view_mac.h
index ee21344..1c46221 100644
--- a/chrome/browser/tab_contents/web_contents_view_mac.h
+++ b/chrome/browser/tab_contents/web_contents_view_mac.h
@@ -9,7 +9,7 @@
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
-#include "base/scoped_cftyperef.h"
+#include "base/scoped_nsobject.h"
#include "chrome/browser/cocoa/base_view.h"
#include "chrome/browser/tab_contents/web_contents_view.h"
#include "chrome/common/notification_registrar.h"
@@ -93,7 +93,7 @@ class WebContentsViewMac : public WebContentsView,
WebContents* web_contents_;
// The Cocoa NSView that lives in the view hierarchy.
- scoped_cftyperef<WebContentsViewCocoa*> cocoa_view_;
+ scoped_nsobject<WebContentsViewCocoa> cocoa_view_;
// For find in page. This may be NULL if there is no find bar, and if it is
// non-NULL, it may or may not be visible.
@@ -104,7 +104,7 @@ class WebContentsViewMac : public WebContentsView,
// Used to render the sad tab. This will be non-NULL only when the sad tab is
// visible.
- scoped_cftyperef<SadTabView*> sad_tab_;
+ scoped_nsobject<SadTabView> sad_tab_;
DISALLOW_COPY_AND_ASSIGN(WebContentsViewMac);
};
diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm
index c2fdfe1..e2af736 100644
--- a/chrome/browser/tab_contents/web_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/web_contents_view_mac.mm
@@ -41,10 +41,6 @@ WebContents* WebContentsViewMac::GetWebContents() {
void WebContentsViewMac::CreateView() {
WebContentsViewCocoa* view =
[[WebContentsViewCocoa alloc] initWithWebContentsViewMac:this];
- // Under GC, ObjC and CF retains/releases are no longer equivalent. So we
- // change our ObjC retain to a CF retain so we can use a scoped_cftyperef.
- CFRetain(view);
- [view release];
cocoa_view_.reset(view);
}
@@ -255,8 +251,6 @@ void WebContentsViewMac::Observe(NotificationType type,
}
case NotificationType::WEB_CONTENTS_DISCONNECTED: {
SadTabView* view = [[SadTabView alloc] initWithFrame:NSZeroRect];
- CFRetain(view);
- [view release];
sad_tab_.reset(view);
// Set as the dominant child.