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

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

Issue 10079023: Move notifications used only in chrome/ out of content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: six! Created 8 years, 8 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 | Annotate | Revision Log
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/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_model.h" 10 #include "chrome/browser/bookmarks/bookmark_model.h"
(...skipping 28 matching lines...) Expand all
39 SEL selector_; // SEL sent to controller_ on notification. 39 SEL selector_; // SEL sent to controller_ on notification.
40 }; 40 };
41 41
42 BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge( 42 BookmarkBubbleNotificationBridge::BookmarkBubbleNotificationBridge(
43 BookmarkBubbleController* controller, SEL selector) 43 BookmarkBubbleController* controller, SEL selector)
44 : controller_(controller), selector_(selector) { 44 : controller_(controller), selector_(selector) {
45 // registrar_ will automatically RemoveAll() when destroyed so we 45 // registrar_ will automatically RemoveAll() when destroyed so we
46 // don't need to do so explicitly. 46 // don't need to do so explicitly.
47 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED, 47 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
48 content::NotificationService::AllSources()); 48 content::NotificationService::AllSources());
49 registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED, 49 registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
50 content::NotificationService::AllSources()); 50 content::NotificationService::AllSources());
51 } 51 }
52 52
53 // At this time all notifications instigate the same behavior (go 53 // At this time all notifications instigate the same behavior (go
54 // away) so we don't bother checking which notification came in. 54 // away) so we don't bother checking which notification came in.
55 void BookmarkBubbleNotificationBridge::Observe( 55 void BookmarkBubbleNotificationBridge::Observe(
56 int type, 56 int type,
57 const content::NotificationSource& source, 57 const content::NotificationSource& source,
58 const content::NotificationDetails& details) { 58 const content::NotificationDetails& details) {
59 [controller_ performSelector:selector_ withObject:controller_]; 59 [controller_ performSelector:selector_ withObject:controller_];
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; 400 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue];
401 DCHECK(idx != -1); 401 DCHECK(idx != -1);
402 [folderPopUpButton_ selectItemAtIndex:idx]; 402 [folderPopUpButton_ selectItemAtIndex:idx];
403 } 403 }
404 404
405 - (NSPopUpButton*)folderPopUpButton { 405 - (NSPopUpButton*)folderPopUpButton {
406 return folderPopUpButton_; 406 return folderPopUpButton_;
407 } 407 }
408 408
409 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) 409 @end // implementation BookmarkBubbleController(ExposedForUnitTesting)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698