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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
6 | 6 |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/alternate_nav_url_fetcher.h" | 12 #include "chrome/browser/alternate_nav_url_fetcher.h" |
13 #import "chrome/browser/app_controller_mac.h" | 13 #import "chrome/browser/app_controller_mac.h" |
14 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" | 14 #import "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
15 #import "chrome/browser/autocomplete/autocomplete_popup_model.h" | 15 #import "chrome/browser/autocomplete/autocomplete_popup_model.h" |
16 #include "chrome/browser/browser_list.h" | 16 #include "chrome/browser/browser_list.h" |
17 #include "chrome/browser/command_updater.h" | 17 #include "chrome/browser/command_updater.h" |
| 18 #include "chrome/browser/content_setting_bubble_model.h" |
18 #include "chrome/browser/content_setting_image_model.h" | 19 #include "chrome/browser/content_setting_image_model.h" |
19 #include "chrome/browser/content_setting_bubble_model.h" | |
20 #include "chrome/browser/defaults.h" | 20 #include "chrome/browser/defaults.h" |
21 #include "chrome/browser/extensions/extension_browser_event_router.h" | 21 #include "chrome/browser/extensions/extension_browser_event_router.h" |
22 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
23 #include "chrome/browser/extensions/extension_tabs_module.h" | 23 #include "chrome/browser/extensions/extension_tabs_module.h" |
24 #include "chrome/browser/instant/instant_controller.h" | 24 #include "chrome/browser/instant/instant_controller.h" |
25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/search_engines/template_url.h" | 26 #include "chrome/browser/search_engines/template_url.h" |
27 #include "chrome/browser/search_engines/template_url_model.h" | 27 #include "chrome/browser/search_engines/template_url_model.h" |
28 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" | 28 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" |
29 #include "chrome/browser/ui/cocoa/event_utils.h" | 29 #include "chrome/browser/ui/cocoa/event_utils.h" |
30 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" | 30 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" |
31 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" | 31 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" |
32 #import "chrome/browser/ui/cocoa/first_run_bubble_controller.h" | 32 #import "chrome/browser/ui/cocoa/first_run_bubble_controller.h" |
33 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" | 33 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" |
34 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" | 34 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" |
35 #import "chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h" | 35 #import "chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h" |
36 #import "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h" | 36 #import "chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h" |
37 #import "chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h" | 37 #import "chrome/browser/ui/cocoa/location_bar/keyword_hint_decoration.h" |
38 #import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h" | 38 #import "chrome/browser/ui/cocoa/location_bar/location_icon_decoration.h" |
39 #import "chrome/browser/ui/cocoa/location_bar/page_action_decoration.h" | 39 #import "chrome/browser/ui/cocoa/location_bar/page_action_decoration.h" |
40 #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h" | 40 #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h" |
41 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h" | 41 #import "chrome/browser/ui/cocoa/location_bar/star_decoration.h" |
42 #include "chrome/browser/ui/omnibox/location_bar_util.h" | 42 #include "chrome/browser/ui/omnibox/location_bar_util.h" |
43 #include "chrome/common/extensions/extension.h" | 43 #include "chrome/common/extensions/extension.h" |
44 #include "chrome/common/extensions/extension_action.h" | 44 #include "chrome/common/extensions/extension_action.h" |
45 #include "chrome/common/extensions/extension_resource.h" | 45 #include "chrome/common/extensions/extension_resource.h" |
46 #include "chrome/common/notification_service.h" | |
47 #include "content/browser/tab_contents/navigation_entry.h" | 46 #include "content/browser/tab_contents/navigation_entry.h" |
48 #include "content/browser/tab_contents/tab_contents.h" | 47 #include "content/browser/tab_contents/tab_contents.h" |
49 #include "net/base/net_util.h" | 48 #include "content/common/notification_service.h" |
50 #include "grit/generated_resources.h" | 49 #include "grit/generated_resources.h" |
51 #include "grit/theme_resources.h" | 50 #include "grit/theme_resources.h" |
| 51 #include "net/base/net_util.h" |
52 #include "skia/ext/skia_utils_mac.h" | 52 #include "skia/ext/skia_utils_mac.h" |
53 #include "third_party/skia/include/core/SkBitmap.h" | 53 #include "third_party/skia/include/core/SkBitmap.h" |
54 #include "ui/base/l10n/l10n_util_mac.h" | 54 #include "ui/base/l10n/l10n_util_mac.h" |
55 #include "ui/base/resource/resource_bundle.h" | 55 #include "ui/base/resource/resource_bundle.h" |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 // Vertical space between the bottom edge of the location_bar and the first run | 59 // Vertical space between the bottom edge of the location_bar and the first run |
60 // bubble arrow point. | 60 // bubble arrow point. |
61 const static int kFirstRunBubbleYOffset = 1; | 61 const static int kFirstRunBubbleYOffset = 1; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 622 |
623 // These need to change anytime the layout changes. | 623 // These need to change anytime the layout changes. |
624 // TODO(shess): Anytime the field editor might have changed, the | 624 // TODO(shess): Anytime the field editor might have changed, the |
625 // cursor rects almost certainly should have changed. The tooltips | 625 // cursor rects almost certainly should have changed. The tooltips |
626 // might change even when the rects don't change. | 626 // might change even when the rects don't change. |
627 [field_ resetFieldEditorFrameIfNeeded]; | 627 [field_ resetFieldEditorFrameIfNeeded]; |
628 [field_ updateCursorAndToolTipRects]; | 628 [field_ updateCursorAndToolTipRects]; |
629 | 629 |
630 [field_ setNeedsDisplay:YES]; | 630 [field_ setNeedsDisplay:YES]; |
631 } | 631 } |
OLD | NEW |