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

Unified Diff: chrome/browser/cocoa/infobar_container_controller.mm

Issue 2878037: [Mac]Implement ViewID support. (third approach) (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Update according to review feedback. Created 10 years, 5 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/find_bar_view.mm ('k') | chrome/browser/cocoa/location_bar/autocomplete_text_field.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/infobar_container_controller.mm
diff --git a/chrome/browser/cocoa/infobar_container_controller.mm b/chrome/browser/cocoa/infobar_container_controller.mm
index 2f8b7514435dd7058a39fa24dd27ec1e10d674c1..374d9201430bf2808ea3c13eb4831e13d079f3b7 100644
--- a/chrome/browser/cocoa/infobar_container_controller.mm
+++ b/chrome/browser/cocoa/infobar_container_controller.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -9,6 +9,7 @@
#import "chrome/browser/cocoa/infobar_container_controller.h"
#import "chrome/browser/cocoa/infobar_controller.h"
#include "chrome/browser/cocoa/tab_strip_model_observer_bridge.h"
+#import "chrome/browser/cocoa/view_id_util.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_service.h"
@@ -93,9 +94,16 @@ class InfoBarNotificationObserver : public NotificationObserver {
- (void)dealloc {
DCHECK([infobarControllers_ count] == 0);
+ view_id_util::UnsetID([self view]);
[super dealloc];
}
+- (void)awakeFromNib {
+ // The info bar container view is an ordinary NSView object, so we set its
+ // ViewID here.
+ view_id_util::SetID([self view], VIEW_ID_INFO_BAR_CONTAINER);
+}
+
- (void)removeDelegate:(InfoBarDelegate*)delegate {
DCHECK(currentTabContents_);
currentTabContents_->RemoveInfoBar(delegate);
« no previous file with comments | « chrome/browser/cocoa/find_bar_view.mm ('k') | chrome/browser/cocoa/location_bar/autocomplete_text_field.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698