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 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "content/public/browser/render_view_host.h" | 57 #include "content/public/browser/render_view_host.h" |
58 #include "content/public/browser/render_widget_host_view.h" | 58 #include "content/public/browser/render_widget_host_view.h" |
59 #include "content/public/browser/user_metrics.h" | 59 #include "content/public/browser/user_metrics.h" |
60 #include "content/public/browser/web_contents.h" | 60 #include "content/public/browser/web_contents.h" |
61 #include "content/public/common/page_transition_types.h" | 61 #include "content/public/common/page_transition_types.h" |
62 #include "extensions/browser/extension_registry.h" | 62 #include "extensions/browser/extension_registry.h" |
63 #include "extensions/common/extension.h" | 63 #include "extensions/common/extension.h" |
64 #include "extensions/common/extension_set.h" | 64 #include "extensions/common/extension_set.h" |
65 #include "grit/generated_resources.h" | 65 #include "grit/generated_resources.h" |
66 #include "grit/theme_resources.h" | 66 #include "grit/theme_resources.h" |
67 #include "grit/ui_resources.h" | |
68 #include "ui/accessibility/ax_view_state.h" | 67 #include "ui/accessibility/ax_view_state.h" |
69 #include "ui/base/dragdrop/drag_utils.h" | 68 #include "ui/base/dragdrop/drag_utils.h" |
70 #include "ui/base/dragdrop/os_exchange_data.h" | 69 #include "ui/base/dragdrop/os_exchange_data.h" |
71 #include "ui/base/l10n/l10n_util.h" | 70 #include "ui/base/l10n/l10n_util.h" |
72 #include "ui/base/resource/resource_bundle.h" | 71 #include "ui/base/resource/resource_bundle.h" |
73 #include "ui/base/theme_provider.h" | 72 #include "ui/base/theme_provider.h" |
74 #include "ui/base/window_open_disposition.h" | 73 #include "ui/base/window_open_disposition.h" |
75 #include "ui/gfx/animation/slide_animation.h" | 74 #include "ui/gfx/animation/slide_animation.h" |
76 #include "ui/gfx/canvas.h" | 75 #include "ui/gfx/canvas.h" |
77 #include "ui/gfx/text_constants.h" | 76 #include "ui/gfx/text_constants.h" |
78 #include "ui/gfx/text_elider.h" | 77 #include "ui/gfx/text_elider.h" |
| 78 #include "ui/resources/grit/ui_resources.h" |
79 #include "ui/views/button_drag_utils.h" | 79 #include "ui/views/button_drag_utils.h" |
80 #include "ui/views/controls/button/label_button.h" | 80 #include "ui/views/controls/button/label_button.h" |
81 #include "ui/views/controls/button/label_button_border.h" | 81 #include "ui/views/controls/button/label_button_border.h" |
82 #include "ui/views/controls/button/menu_button.h" | 82 #include "ui/views/controls/button/menu_button.h" |
83 #include "ui/views/controls/label.h" | 83 #include "ui/views/controls/label.h" |
84 #include "ui/views/drag_utils.h" | 84 #include "ui/views/drag_utils.h" |
85 #include "ui/views/metrics.h" | 85 #include "ui/views/metrics.h" |
86 #include "ui/views/view_constants.h" | 86 #include "ui/views/view_constants.h" |
87 #include "ui/views/widget/tooltip_manager.h" | 87 #include "ui/views/widget/tooltip_manager.h" |
88 #include "ui/views/widget/widget.h" | 88 #include "ui/views/widget/widget.h" |
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 DCHECK(apps_page_shortcut_); | 1957 DCHECK(apps_page_shortcut_); |
1958 // Only perform layout if required. | 1958 // Only perform layout if required. |
1959 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1959 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
1960 browser_->profile(), browser_->host_desktop_type()); | 1960 browser_->profile(), browser_->host_desktop_type()); |
1961 if (apps_page_shortcut_->visible() == visible) | 1961 if (apps_page_shortcut_->visible() == visible) |
1962 return; | 1962 return; |
1963 apps_page_shortcut_->SetVisible(visible); | 1963 apps_page_shortcut_->SetVisible(visible); |
1964 UpdateBookmarksSeparatorVisibility(); | 1964 UpdateBookmarksSeparatorVisibility(); |
1965 Layout(); | 1965 Layout(); |
1966 } | 1966 } |
OLD | NEW |