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

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

Issue 1697223002: Remove HostDesktopType from c/b/ui/bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-21
Patch Set: #else and mac Created 4 years, 10 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 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 canShow:YES 1298 canShow:YES
1299 resetAllButtonPositions:NO]; 1299 resetAllButtonPositions:NO];
1300 } 1300 }
1301 1301
1302 // Shows or hides the Apps button as appropriate, and returns whether it ended 1302 // Shows or hides the Apps button as appropriate, and returns whether it ended
1303 // up visible. 1303 // up visible.
1304 - (BOOL)setAppsPageShortcutButtonVisibility { 1304 - (BOOL)setAppsPageShortcutButtonVisibility {
1305 if (!appsPageShortcutButton_.get()) 1305 if (!appsPageShortcutButton_.get())
1306 return NO; 1306 return NO;
1307 1307
1308 BOOL visible = bookmarkModel_->loaded() && 1308 BOOL visible =
1309 chrome::ShouldShowAppsShortcutInBookmarkBar( 1309 bookmarkModel_->loaded() &&
1310 browser_->profile(), browser_->host_desktop_type()); 1310 chrome::ShouldShowAppsShortcutInBookmarkBar(browser_->profile());
1311 [appsPageShortcutButton_ setHidden:!visible]; 1311 [appsPageShortcutButton_ setHidden:!visible];
1312 return visible; 1312 return visible;
1313 } 1313 }
1314 1314
1315 // Creates a bookmark bar button that does not correspond to a regular bookmark 1315 // Creates a bookmark bar button that does not correspond to a regular bookmark
1316 // or folder. It is used by the "Other Bookmarks" and the "Apps" buttons. 1316 // or folder. It is used by the "Other Bookmarks" and the "Apps" buttons.
1317 - (BookmarkButton*)createCustomBookmarkButtonForCell:(NSCell*)cell { 1317 - (BookmarkButton*)createCustomBookmarkButtonForCell:(NSCell*)cell {
1318 BookmarkButton* button = [[BookmarkButton alloc] init]; 1318 BookmarkButton* button = [[BookmarkButton alloc] init];
1319 [[button draggableButton] setDraggable:NO]; 1319 [[button draggableButton] setDraggable:NO];
1320 [[button draggableButton] setActsOnMouseDown:YES]; 1320 [[button draggableButton] setActsOnMouseDown:YES];
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 - (id<BookmarkButtonControllerProtocol>)controllerForNode: 2945 - (id<BookmarkButtonControllerProtocol>)controllerForNode:
2946 (const BookmarkNode*)node { 2946 (const BookmarkNode*)node {
2947 // See if it's in the bar, then if it is in the hierarchy of visible 2947 // See if it's in the bar, then if it is in the hierarchy of visible
2948 // folder menus. 2948 // folder menus.
2949 if (bookmarkModel_->bookmark_bar_node() == node) 2949 if (bookmarkModel_->bookmark_bar_node() == node)
2950 return self; 2950 return self;
2951 return [folderController_ controllerForNode:node]; 2951 return [folderController_ controllerForNode:node];
2952 } 2952 }
2953 2953
2954 @end 2954 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698