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 <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.h" | 42 #include "chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.h" |
43 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h" | 43 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h" |
44 #include "chrome/browser/ui/views/event_utils.h" | 44 #include "chrome/browser/ui/views/event_utils.h" |
45 #include "chrome/browser/ui/views/frame/browser_view.h" | 45 #include "chrome/browser/ui/views/frame/browser_view.h" |
46 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 46 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
47 #include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h" | 47 #include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h" |
48 #include "chrome/common/chrome_switches.h" | 48 #include "chrome/common/chrome_switches.h" |
49 #include "chrome/common/extensions/extension_constants.h" | 49 #include "chrome/common/extensions/extension_constants.h" |
50 #include "chrome/common/pref_names.h" | 50 #include "chrome/common/pref_names.h" |
51 #include "chrome/common/url_constants.h" | 51 #include "chrome/common/url_constants.h" |
| 52 #include "components/bookmarks/bookmark_pref_names.h" |
52 #include "content/public/browser/notification_details.h" | 53 #include "content/public/browser/notification_details.h" |
53 #include "content/public/browser/notification_source.h" | 54 #include "content/public/browser/notification_source.h" |
54 #include "content/public/browser/page_navigator.h" | 55 #include "content/public/browser/page_navigator.h" |
55 #include "content/public/browser/render_view_host.h" | 56 #include "content/public/browser/render_view_host.h" |
56 #include "content/public/browser/render_widget_host_view.h" | 57 #include "content/public/browser/render_widget_host_view.h" |
57 #include "content/public/browser/user_metrics.h" | 58 #include "content/public/browser/user_metrics.h" |
58 #include "content/public/browser/web_contents.h" | 59 #include "content/public/browser/web_contents.h" |
59 #include "content/public/common/page_transition_types.h" | 60 #include "content/public/common/page_transition_types.h" |
60 #include "grit/generated_resources.h" | 61 #include "grit/generated_resources.h" |
61 #include "grit/theme_resources.h" | 62 #include "grit/theme_resources.h" |
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 DCHECK(apps_page_shortcut_); | 1850 DCHECK(apps_page_shortcut_); |
1850 // Only perform layout if required. | 1851 // Only perform layout if required. |
1851 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1852 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
1852 browser_->profile(), browser_->host_desktop_type()); | 1853 browser_->profile(), browser_->host_desktop_type()); |
1853 if (apps_page_shortcut_->visible() == visible) | 1854 if (apps_page_shortcut_->visible() == visible) |
1854 return; | 1855 return; |
1855 apps_page_shortcut_->SetVisible(visible); | 1856 apps_page_shortcut_->SetVisible(visible); |
1856 UpdateBookmarksSeparatorVisibility(); | 1857 UpdateBookmarksSeparatorVisibility(); |
1857 Layout(); | 1858 Layout(); |
1858 } | 1859 } |
OLD | NEW |