Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #include "base/mac/sdk_forward_declarations.h" | 8 #include "base/mac/sdk_forward_declarations.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 2438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2449 } | 2449 } |
| 2450 | 2450 |
| 2451 #pragma mark BookmarkBarToolbarViewController Protocol | 2451 #pragma mark BookmarkBarToolbarViewController Protocol |
| 2452 | 2452 |
| 2453 - (int)currentTabContentsHeight { | 2453 - (int)currentTabContentsHeight { |
| 2454 BrowserWindowController* browserController = | 2454 BrowserWindowController* browserController = |
| 2455 [BrowserWindowController browserWindowControllerForView:[self view]]; | 2455 [BrowserWindowController browserWindowControllerForView:[self view]]; |
| 2456 return NSHeight([[browserController tabContentArea] frame]); | 2456 return NSHeight([[browserController tabContentArea] frame]); |
| 2457 } | 2457 } |
| 2458 | 2458 |
| 2459 - (ThemeService*)themeService { | 2459 - (Profile*)profile { |
|
groby-ooo-7-16
2015/12/11 02:32:00
Do we need this method at all?
The protocol is on
Evan Stade
2015/12/11 19:36:58
but where it's used, it's cast as a BookmarkBarToo
| |
| 2460 return ThemeServiceFactory::GetForProfile(browser_->profile()); | 2460 return browser_->profile(); |
| 2461 } | 2461 } |
| 2462 | 2462 |
| 2463 #pragma mark BookmarkButtonDelegate Protocol | 2463 #pragma mark BookmarkButtonDelegate Protocol |
| 2464 | 2464 |
| 2465 - (void)fillPasteboard:(NSPasteboard*)pboard | 2465 - (void)fillPasteboard:(NSPasteboard*)pboard |
| 2466 forDragOfButton:(BookmarkButton*)button { | 2466 forDragOfButton:(BookmarkButton*)button { |
| 2467 [[self folderTarget] fillPasteboard:pboard forDragOfButton:button]; | 2467 [[self folderTarget] fillPasteboard:pboard forDragOfButton:button]; |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 // BookmarkButtonDelegate protocol implementation. When menus are | 2470 // BookmarkButtonDelegate protocol implementation. When menus are |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2938 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 2938 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 2939 (const BookmarkNode*)node { | 2939 (const BookmarkNode*)node { |
| 2940 // See if it's in the bar, then if it is in the hierarchy of visible | 2940 // See if it's in the bar, then if it is in the hierarchy of visible |
| 2941 // folder menus. | 2941 // folder menus. |
| 2942 if (bookmarkModel_->bookmark_bar_node() == node) | 2942 if (bookmarkModel_->bookmark_bar_node() == node) |
| 2943 return self; | 2943 return self; |
| 2944 return [folderController_ controllerForNode:node]; | 2944 return [folderController_ controllerForNode:node]; |
| 2945 } | 2945 } |
| 2946 | 2946 |
| 2947 @end | 2947 @end |
| OLD | NEW |