OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/logging.h" | 7 #include "base/logging.h" |
8 #import "base/memory/scoped_nsobject.h" | 8 #import "base/memory/scoped_nsobject.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h" |
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h" | |
12 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
13 #import "chrome/browser/ui/cocoa/view_id_util.h" | 12 #import "chrome/browser/ui/cocoa/view_id_util.h" |
14 #include "content/browser/user_metrics.h" | 13 #include "content/browser/user_metrics.h" |
15 | 14 |
16 // The opacity of the bookmark button drag image. | 15 // The opacity of the bookmark button drag image. |
17 static const CGFloat kDragImageOpacity = 0.7; | 16 static const CGFloat kDragImageOpacity = 0.7; |
18 | 17 |
19 | 18 |
20 namespace bookmark_button { | 19 namespace bookmark_button { |
21 | 20 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 [image drawAtPoint:NSMakePoint(0, 0) | 421 [image drawAtPoint:NSMakePoint(0, 0) |
423 fromRect:NSMakeRect(0, 0, NSWidth(bounds), NSHeight(bounds)) | 422 fromRect:NSMakeRect(0, 0, NSWidth(bounds), NSHeight(bounds)) |
424 operation:NSCompositeSourceOver | 423 operation:NSCompositeSourceOver |
425 fraction:kDragImageOpacity]; | 424 fraction:kDragImageOpacity]; |
426 | 425 |
427 [dragImage unlockFocus]; | 426 [dragImage unlockFocus]; |
428 return dragImage; | 427 return dragImage; |
429 } | 428 } |
430 | 429 |
431 @end // @implementation BookmarkButton(Private) | 430 @end // @implementation BookmarkButton(Private) |
OLD | NEW |