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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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" |
89 #include "ui/views/window/non_client_view.h" | 89 #include "ui/views/window/non_client_view.h" |
90 | 90 |
91 using base::UserMetricsAction; | 91 using base::UserMetricsAction; |
| 92 using bookmarks::BookmarkNodeData; |
92 using content::OpenURLParams; | 93 using content::OpenURLParams; |
93 using content::PageNavigator; | 94 using content::PageNavigator; |
94 using content::Referrer; | 95 using content::Referrer; |
95 using ui::DropTargetEvent; | 96 using ui::DropTargetEvent; |
96 using views::CustomButton; | 97 using views::CustomButton; |
97 using views::LabelButtonBorder; | 98 using views::LabelButtonBorder; |
98 using views::MenuButton; | 99 using views::MenuButton; |
99 using views::View; | 100 using views::View; |
100 | 101 |
101 // Margins around the content. | 102 // Margins around the content. |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 DCHECK(apps_page_shortcut_); | 1953 DCHECK(apps_page_shortcut_); |
1953 // Only perform layout if required. | 1954 // Only perform layout if required. |
1954 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1955 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
1955 browser_->profile(), browser_->host_desktop_type()); | 1956 browser_->profile(), browser_->host_desktop_type()); |
1956 if (apps_page_shortcut_->visible() == visible) | 1957 if (apps_page_shortcut_->visible() == visible) |
1957 return; | 1958 return; |
1958 apps_page_shortcut_->SetVisible(visible); | 1959 apps_page_shortcut_->SetVisible(visible); |
1959 UpdateBookmarksSeparatorVisibility(); | 1960 UpdateBookmarksSeparatorVisibility(); |
1960 Layout(); | 1961 Layout(); |
1961 } | 1962 } |
OLD | NEW |