| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
| 8 #include "app/resource_bundle.h" | |
| 9 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 10 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_editor.h" | 10 #include "chrome/browser/bookmarks/bookmark_editor.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 13 #include "chrome/browser/bookmarks/bookmark_utils.h" | 12 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 14 #include "chrome/browser/metrics/user_metrics.h" | 13 #include "chrome/browser/metrics/user_metrics.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
| 17 #include "chrome/browser/tab_contents/tab_contents_view.h" | 16 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 18 #import "chrome/browser/themes/browser_theme_provider.h" | 17 #import "chrome/browser/themes/browser_theme_provider.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 #import "chrome/browser/ui/cocoa/importer/import_settings_dialog.h" | 36 #import "chrome/browser/ui/cocoa/importer/import_settings_dialog.h" |
| 38 #import "chrome/browser/ui/cocoa/menu_button.h" | 37 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 39 #import "chrome/browser/ui/cocoa/themed_window.h" | 38 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 40 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 39 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 41 #import "chrome/browser/ui/cocoa/view_id_util.h" | 40 #import "chrome/browser/ui/cocoa/view_id_util.h" |
| 42 #import "chrome/browser/ui/cocoa/view_resizer.h" | 41 #import "chrome/browser/ui/cocoa/view_resizer.h" |
| 43 #include "grit/app_resources.h" | 42 #include "grit/app_resources.h" |
| 44 #include "grit/generated_resources.h" | 43 #include "grit/generated_resources.h" |
| 45 #include "grit/theme_resources.h" | 44 #include "grit/theme_resources.h" |
| 46 #include "skia/ext/skia_utils_mac.h" | 45 #include "skia/ext/skia_utils_mac.h" |
| 46 #include "ui/base/resource/resource_bundle.h" |
| 47 | 47 |
| 48 // Bookmark bar state changing and animations | 48 // Bookmark bar state changing and animations |
| 49 // | 49 // |
| 50 // The bookmark bar has three real states: "showing" (a normal bar attached to | 50 // The bookmark bar has three real states: "showing" (a normal bar attached to |
| 51 // the toolbar), "hidden", and "detached" (pretending to be part of the web | 51 // the toolbar), "hidden", and "detached" (pretending to be part of the web |
| 52 // content on the NTP). It can, or at least should be able to, animate between | 52 // content on the NTP). It can, or at least should be able to, animate between |
| 53 // these states. There are several complications even without animation: | 53 // these states. There are several complications even without animation: |
| 54 // - The placement of the bookmark bar is done by the BWC, and it needs to know | 54 // - The placement of the bookmark bar is done by the BWC, and it needs to know |
| 55 // the state in order to place the bookmark bar correctly (immediately below | 55 // the state in order to place the bookmark bar correctly (immediately below |
| 56 // the toolbar when showing, below the infobar when detached). | 56 // the toolbar when showing, below the infobar when detached). |
| (...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 // to minimize touching the object passed in (likely a mock). | 2486 // to minimize touching the object passed in (likely a mock). |
| 2487 - (void)setButtonContextMenu:(id)menu { | 2487 - (void)setButtonContextMenu:(id)menu { |
| 2488 buttonContextMenu_ = menu; | 2488 buttonContextMenu_ = menu; |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 - (void)setIgnoreAnimations:(BOOL)ignore { | 2491 - (void)setIgnoreAnimations:(BOOL)ignore { |
| 2492 ignoreAnimations_ = ignore; | 2492 ignoreAnimations_ = ignore; |
| 2493 } | 2493 } |
| 2494 | 2494 |
| 2495 @end | 2495 @end |
| OLD | NEW |