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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix that unittest Created 5 years 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 unified diff | Download patch
OLDNEW
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
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 {
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
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
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_unittest.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698