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

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

Issue 769153007: Managed bookmarks for supervised users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build (Android & unit_tests) Created 5 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_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 9 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 } 102 }
103 103
104 // If this is a new bookmark somewhere visible (e.g. on the bookmark 104 // If this is a new bookmark somewhere visible (e.g. on the bookmark
105 // bar), pulse it. Else, call ourself recursively with our parent 105 // bar), pulse it. Else, call ourself recursively with our parent
106 // until we find something visible to pulse. 106 // until we find something visible to pulse.
107 - (void)startPulsingBookmarkButton:(const BookmarkNode*)node { 107 - (void)startPulsingBookmarkButton:(const BookmarkNode*)node {
108 while (node) { 108 while (node) {
109 if ((node->parent() == model_->bookmark_bar_node()) || 109 if ((node->parent() == model_->bookmark_bar_node()) ||
110 (node->parent() == client_->managed_node()) || 110 (node->parent() == client_->managed_node()) ||
111 (node->parent() == client_->supervised_node()) ||
111 (node == model_->other_node())) { 112 (node == model_->other_node())) {
112 pulsingBookmarkNode_ = node; 113 pulsingBookmarkNode_ = node;
113 bookmarkObserver_->StartObservingNode(pulsingBookmarkNode_); 114 bookmarkObserver_->StartObservingNode(pulsingBookmarkNode_);
114 NSValue *value = [NSValue valueWithPointer:node]; 115 NSValue *value = [NSValue valueWithPointer:node];
115 NSDictionary *dict = [NSDictionary 116 NSDictionary *dict = [NSDictionary
116 dictionaryWithObjectsAndKeys:value, 117 dictionaryWithObjectsAndKeys:value,
117 bookmark_button::kBookmarkKey, 118 bookmark_button::kBookmarkKey,
118 [NSNumber numberWithBool:YES], 119 [NSNumber numberWithBool:YES],
119 bookmark_button::kBookmarkPulseFlagKey, 120 bookmark_button::kBookmarkPulseFlagKey,
120 nil]; 121 nil];
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 403 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
403 DCHECK(idx != -1); 404 DCHECK(idx != -1);
404 [folderPopUpButton_ selectItemAtIndex:idx]; 405 [folderPopUpButton_ selectItemAtIndex:idx];
405 } 406 }
406 407
407 - (NSPopUpButton*)folderPopUpButton { 408 - (NSPopUpButton*)folderPopUpButton {
408 return folderPopUpButton_; 409 return folderPopUpButton_;
409 } 410 }
410 411
411 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) 412 @end // implementation BookmarkBubbleController(ExposedForUnitTesting)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698