| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 16 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/app/chrome_dll_resource.h" | 17 #include "chrome/app/chrome_dll_resource.h" |
| 18 #include "chrome/browser/app_mode/app_mode_utils.h" | 18 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 19 #include "chrome/browser/bookmarks/bookmark_utils.h" | 19 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/extensions/tab_helper.h" | 22 #include "chrome/browser/extensions/tab_helper.h" |
| 22 #include "chrome/browser/infobars/infobar_service.h" | 23 #include "chrome/browser/infobars/infobar_service.h" |
| 23 #include "chrome/browser/native_window_notification_source.h" | 24 #include "chrome/browser/native_window_notification_source.h" |
| 24 #include "chrome/browser/password_manager/password_manager.h" | 25 #include "chrome/browser/password_manager/password_manager.h" |
| 25 #include "chrome/browser/profiles/avatar_menu_model.h" | 26 #include "chrome/browser/profiles/avatar_menu_model.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/profiles/profile_info_cache.h" | 28 #include "chrome/browser/profiles/profile_info_cache.h" |
| 28 #include "chrome/browser/profiles/profile_manager.h" | 29 #include "chrome/browser/profiles/profile_manager.h" |
| 29 #include "chrome/browser/search/search.h" | 30 #include "chrome/browser/search/search.h" |
| 30 #include "chrome/browser/sessions/tab_restore_service.h" | 31 #include "chrome/browser/sessions/tab_restore_service.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "chrome/browser/ui/views/omnibox/omnibox_views.h" | 76 #include "chrome/browser/ui/views/omnibox/omnibox_views.h" |
| 76 #include "chrome/browser/ui/views/password_generation_bubble_view.h" | 77 #include "chrome/browser/ui/views/password_generation_bubble_view.h" |
| 77 #include "chrome/browser/ui/views/status_bubble_views.h" | 78 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 78 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 79 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 79 #include "chrome/browser/ui/views/tabs/tab.h" | 80 #include "chrome/browser/ui/views/tabs/tab.h" |
| 80 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 81 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 81 #include "chrome/browser/ui/views/toolbar_view.h" | 82 #include "chrome/browser/ui/views/toolbar_view.h" |
| 82 #include "chrome/browser/ui/views/update_recommended_message_box.h" | 83 #include "chrome/browser/ui/views/update_recommended_message_box.h" |
| 83 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" | 84 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
| 84 #include "chrome/browser/ui/window_sizer/window_sizer.h" | 85 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
| 85 #include "chrome/common/chrome_notification_types.h" | |
| 86 #include "chrome/common/chrome_switches.h" | 86 #include "chrome/common/chrome_switches.h" |
| 87 #include "chrome/common/pref_names.h" | 87 #include "chrome/common/pref_names.h" |
| 88 #include "chrome/common/url_constants.h" | 88 #include "chrome/common/url_constants.h" |
| 89 #include "content/public/browser/download_manager.h" | 89 #include "content/public/browser/download_manager.h" |
| 90 #include "content/public/browser/native_web_keyboard_event.h" | 90 #include "content/public/browser/native_web_keyboard_event.h" |
| 91 #include "content/public/browser/notification_service.h" | 91 #include "content/public/browser/notification_service.h" |
| 92 #include "content/public/browser/render_view_host.h" | 92 #include "content/public/browser/render_view_host.h" |
| 93 #include "content/public/browser/render_widget_host.h" | 93 #include "content/public/browser/render_widget_host.h" |
| 94 #include "content/public/browser/user_metrics.h" | 94 #include "content/public/browser/user_metrics.h" |
| 95 #include "content/public/browser/web_contents.h" | 95 #include "content/public/browser/web_contents.h" |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 // The +1 in the next line creates a 1-px gap between icon and arrow tip. | 2741 // The +1 in the next line creates a 1-px gap between icon and arrow tip. |
| 2742 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - | 2742 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - |
| 2743 LocationBarView::kIconInternalPadding + 1); | 2743 LocationBarView::kIconInternalPadding + 1); |
| 2744 ConvertPointToTarget(location_icon_view, this, &icon_bottom); | 2744 ConvertPointToTarget(location_icon_view, this, &icon_bottom); |
| 2745 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2745 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2746 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2746 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2747 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2747 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2748 } | 2748 } |
| 2749 return top_arrow_height; | 2749 return top_arrow_height; |
| 2750 } | 2750 } |
| OLD | NEW |