| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 17 #include "chrome/browser/bookmarks/bookmark_utils.h" | 17 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 18 #include "chrome/browser/browser_shutdown.h" | 18 #include "chrome/browser/browser_shutdown.h" |
| 19 #include "chrome/browser/extensions/extension_service.h" | 19 #include "chrome/browser/extensions/extension_service.h" |
| 20 #include "chrome/browser/prefs/pref_service.h" | 20 #include "chrome/browser/prefs/pref_service.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/browser/sync/sync_ui_util.h" | 22 #include "chrome/browser/sync/sync_ui_util.h" |
| 23 #include "chrome/browser/themes/theme_service.h" | 23 #include "chrome/browser/themes/theme_service.h" |
| 24 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
| 25 #include "chrome/browser/ui/event_disposition_utils.h" |
| 25 #include "chrome/browser/ui/view_ids.h" | 26 #include "chrome/browser/ui/view_ids.h" |
| 27 #include "chrome/browser/ui/views/event_utils.h" |
| 26 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" | 28 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" |
| 27 #include "chrome/browser/ui/views/event_utils.h" | |
| 28 #include "chrome/browser/ui/views/frame/browser_view.h" | 29 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 29 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 30 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 30 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| 31 #include "chrome/common/extensions/extension_constants.h" | 32 #include "chrome/common/extensions/extension_constants.h" |
| 32 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 33 #include "content/browser/renderer_host/render_view_host.h" | 34 #include "content/browser/renderer_host/render_view_host.h" |
| 34 #include "content/browser/renderer_host/render_widget_host_view.h" | 35 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 35 #include "content/browser/tab_contents/page_navigator.h" | 36 #include "content/browser/tab_contents/page_navigator.h" |
| 36 #include "content/browser/tab_contents/tab_contents.h" | 37 #include "content/browser/tab_contents/tab_contents.h" |
| 37 #include "content/browser/user_metrics.h" | 38 #include "content/browser/user_metrics.h" |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 prefsize.set_height(kBarHeight + | 1760 prefsize.set_height(kBarHeight + |
| 1760 static_cast<int>((kNewtabBarHeight - kBarHeight) * | 1761 static_cast<int>((kNewtabBarHeight - kBarHeight) * |
| 1761 (1 - size_animation_->GetCurrentValue()))); | 1762 (1 - size_animation_->GetCurrentValue()))); |
| 1762 } else { | 1763 } else { |
| 1763 prefsize.set_height( | 1764 prefsize.set_height( |
| 1764 static_cast<int>(kBarHeight * size_animation_->GetCurrentValue())); | 1765 static_cast<int>(kBarHeight * size_animation_->GetCurrentValue())); |
| 1765 } | 1766 } |
| 1766 } | 1767 } |
| 1767 return prefsize; | 1768 return prefsize; |
| 1768 } | 1769 } |
| OLD | NEW |