| OLD | NEW |
| 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 "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "extensions/common/extension_set.h" | 58 #include "extensions/common/extension_set.h" |
| 59 #include "grit/theme_resources.h" | 59 #include "grit/theme_resources.h" |
| 60 #import "ui/base/cocoa/cocoa_base_utils.h" | 60 #import "ui/base/cocoa/cocoa_base_utils.h" |
| 61 #include "ui/base/l10n/l10n_util_mac.h" | 61 #include "ui/base/l10n/l10n_util_mac.h" |
| 62 #include "ui/base/resource/resource_bundle.h" | 62 #include "ui/base/resource/resource_bundle.h" |
| 63 #include "ui/gfx/image/image.h" | 63 #include "ui/gfx/image/image.h" |
| 64 #include "ui/resources/grit/ui_resources.h" | 64 #include "ui/resources/grit/ui_resources.h" |
| 65 | 65 |
| 66 using base::UserMetricsAction; | 66 using base::UserMetricsAction; |
| 67 using bookmarks::BookmarkModel; | 67 using bookmarks::BookmarkModel; |
| 68 using bookmarks::BookmarkNode; |
| 68 using bookmarks::BookmarkNodeData; | 69 using bookmarks::BookmarkNodeData; |
| 69 using content::OpenURLParams; | 70 using content::OpenURLParams; |
| 70 using content::Referrer; | 71 using content::Referrer; |
| 71 using content::WebContents; | 72 using content::WebContents; |
| 72 | 73 |
| 73 // Bookmark bar state changing and animations | 74 // Bookmark bar state changing and animations |
| 74 // | 75 // |
| 75 // The bookmark bar has three real states: "showing" (a normal bar attached to | 76 // The bookmark bar has three real states: "showing" (a normal bar attached to |
| 76 // the toolbar), "hidden", and "detached" (pretending to be part of the web | 77 // the toolbar), "hidden", and "detached" (pretending to be part of the web |
| 77 // content on the NTP). It can, or at least should be able to, animate between | 78 // content on the NTP). It can, or at least should be able to, animate between |
| (...skipping 2728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 2807 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 2807 (const BookmarkNode*)node { | 2808 (const BookmarkNode*)node { |
| 2808 // See if it's in the bar, then if it is in the hierarchy of visible | 2809 // See if it's in the bar, then if it is in the hierarchy of visible |
| 2809 // folder menus. | 2810 // folder menus. |
| 2810 if (bookmarkModel_->bookmark_bar_node() == node) | 2811 if (bookmarkModel_->bookmark_bar_node() == node) |
| 2811 return self; | 2812 return self; |
| 2812 return [folderController_ controllerForNode:node]; | 2813 return [folderController_ controllerForNode:node]; |
| 2813 } | 2814 } |
| 2814 | 2815 |
| 2815 @end | 2816 @end |
| OLD | NEW |