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> |
11 | 11 |
12 #include "apps/app_launcher.h" | 12 #include "apps/app_launcher.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "chrome/browser/bookmarks/bookmark_model.h" | 19 #include "chrome/browser/bookmarks/bookmark_model.h" |
20 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 20 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
21 #include "chrome/browser/bookmarks/bookmark_utils.h" | 21 #include "chrome/browser/bookmarks/bookmark_utils.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/browser_shutdown.h" | 23 #include "chrome/browser/browser_shutdown.h" |
24 #include "chrome/browser/defaults.h" | 24 #include "chrome/browser/defaults.h" |
25 #include "chrome/browser/extensions/extension_service.h" | 25 #include "chrome/browser/extensions/extension_service.h" |
26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/search/search.h" | 27 #include "chrome/browser/search/search.h" |
28 #include "chrome/browser/sync/profile_sync_service.h" | 28 #include "chrome/browser/sync/profile_sync_service.h" |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 DCHECK(apps_page_shortcut_); | 1862 DCHECK(apps_page_shortcut_); |
1863 // Only perform layout if required. | 1863 // Only perform layout if required. |
1864 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1864 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
1865 browser_->profile()); | 1865 browser_->profile()); |
1866 if (apps_page_shortcut_->visible() == visible) | 1866 if (apps_page_shortcut_->visible() == visible) |
1867 return; | 1867 return; |
1868 apps_page_shortcut_->SetVisible(visible); | 1868 apps_page_shortcut_->SetVisible(visible); |
1869 UpdateBookmarksSeparatorVisibility(); | 1869 UpdateBookmarksSeparatorVisibility(); |
1870 Layout(); | 1870 Layout(); |
1871 } | 1871 } |
OLD | NEW |