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

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

Issue 865163003: bookmarks: Move BookmarkNode into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhanced_bookmarks fix 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_button.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 #import "base/mac/scoped_nsobject.h" 11 #import "base/mac/scoped_nsobject.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h" 12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h"
13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h"
14 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 14 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
15 #import "chrome/browser/ui/cocoa/view_id_util.h" 15 #import "chrome/browser/ui/cocoa/view_id_util.h"
16 #include "components/bookmarks/browser/bookmark_model.h" 16 #include "components/bookmarks/browser/bookmark_model.h"
17 #include "content/public/browser/user_metrics.h" 17 #include "content/public/browser/user_metrics.h"
18 #import "ui/base/cocoa/nsview_additions.h" 18 #import "ui/base/cocoa/nsview_additions.h"
19 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 19 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
20 20
21 using base::UserMetricsAction; 21 using base::UserMetricsAction;
22 using bookmarks::BookmarkNode;
22 23
23 // The opacity of the bookmark button drag image. 24 // The opacity of the bookmark button drag image.
24 static const CGFloat kDragImageOpacity = 0.7; 25 static const CGFloat kDragImageOpacity = 0.7;
25 26
26
27 namespace bookmark_button { 27 namespace bookmark_button {
28 28
29 NSString* const kPulseBookmarkButtonNotification = 29 NSString* const kPulseBookmarkButtonNotification =
30 @"PulseBookmarkButtonNotification"; 30 @"PulseBookmarkButtonNotification";
31 NSString* const kBookmarkKey = @"BookmarkKey"; 31 NSString* const kBookmarkKey = @"BookmarkKey";
32 NSString* const kBookmarkPulseFlagKey = @"BookmarkPulseFlagKey"; 32 NSString* const kBookmarkPulseFlagKey = @"BookmarkPulseFlagKey";
33 33
34 }; 34 };
35 35
36 namespace { 36 namespace {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 [[cell clipPathForFrame:bounds inView:self] setClip]; 466 [[cell clipPathForFrame:bounds inView:self] setClip];
467 [cell drawWithFrame:bounds inView:self]; 467 [cell drawWithFrame:bounds inView:self];
468 468
469 CGContextEndTransparencyLayer(cgContext); 469 CGContextEndTransparencyLayer(cgContext);
470 [image unlockFocus]; 470 [image unlockFocus];
471 471
472 return image.autorelease(); 472 return image.autorelease();
473 } 473 }
474 474
475 @end // @implementation BookmarkButton(Private) 475 @end // @implementation BookmarkButton(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698