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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 1356023002: Mac: Support 10.10's -[NSViewController viewDidLoad] for BookmarkBarController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix warnings Created 5 years, 3 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/ui/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 21182459cf3a4fa82514570d59fa30c43b1c45dc..6f0a942a1b32115eed3f022b4a07868c3d8c11cc 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -5,6 +5,7 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
#include "base/mac/bundle_locations.h"
+#include "base/mac/sdk_forward_declarations.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/strings/sys_string_conversions.h"
@@ -151,7 +152,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
} // namespace
-@interface BookmarkBarController(Private)
+@interface BookmarkBarController ()
// Moves to the given next state (from the current state), possibly animating.
// If |animate| is NO, it will stop any running animation and jump to the given
@@ -224,7 +225,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
- (void)clearMenuTagMap;
- (int)preferredHeight;
- (void)addButtonsToView;
-- (BOOL)setBookmarkButtonVisibility;
tapted 2015/09/21 12:24:03 (this isn't defined, and became an error when the
- (BOOL)setManagedBookmarksButtonVisibility;
- (BOOL)setSupervisedBookmarksButtonVisibility;
- (BOOL)setOtherBookmarksButtonVisibility;
@@ -400,6 +400,17 @@ void RecordAppLaunch(Profile* profile, GURL url) {
}
- (void)awakeFromNib {
+ [self viewDidLoad];
+}
+
+- (void)viewDidLoad {
+ if (bridge_) {
+ // When running on 10.10, expect both -awakeFromNib and -viewDidLoad to be
+ // called, but only initialize once.
+ DCHECK(base::mac::IsOSYosemiteOrLater());
+ return;
+ }
+
// We default to NOT open, which means height=0.
DCHECK([[self view] isHidden]); // Hidden so it's OK to change.

Powered by Google App Engine
This is Rietveld 408576698