OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autocomplete/autocomplete_edit_view_mac.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
6 | 6 |
7 #include <Carbon/Carbon.h> // kVK_Return | 7 #include <Carbon/Carbon.h> // kVK_Return |
8 | 8 |
9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
12 #include "base/nsimage_cache_mac.h" | 12 #include "base/nsimage_cache_mac.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 16 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
17 #include "chrome/browser/autocomplete/autocomplete_match.h" | 17 #include "chrome/browser/autocomplete/autocomplete_match.h" |
18 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 18 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
19 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" | 19 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" |
20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/tab_contents/tab_contents.h" | 21 #include "chrome/browser/tab_contents/tab_contents.h" |
22 #include "chrome/browser/toolbar_model.h" | |
23 #include "chrome/browser/ui/cocoa/event_utils.h" | 22 #include "chrome/browser/ui/cocoa/event_utils.h" |
| 23 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
27 #import "third_party/mozilla/NSPasteboard+Utils.h" | 27 #import "third_party/mozilla/NSPasteboard+Utils.h" |
28 | 28 |
29 // Focus-handling between |field_| and |model_| is a bit subtle. | 29 // Focus-handling between |field_| and |model_| is a bit subtle. |
30 // Other platforms detect change of focus, which is inconvenient | 30 // Other platforms detect change of focus, which is inconvenient |
31 // without subclassing NSTextField (even with a subclass, the use of a | 31 // without subclassing NSTextField (even with a subclass, the use of a |
32 // field editor may complicate things). | 32 // field editor may complicate things). |
33 // | 33 // |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 } | 1068 } |
1069 | 1069 |
1070 return std::wstring(); | 1070 return std::wstring(); |
1071 } | 1071 } |
1072 | 1072 |
1073 // static | 1073 // static |
1074 NSFont* AutocompleteEditViewMac::GetFieldFont() { | 1074 NSFont* AutocompleteEditViewMac::GetFieldFont() { |
1075 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1075 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1076 return rb.GetFont(ResourceBundle::BaseFont).GetNativeFont(); | 1076 return rb.GetFont(ResourceBundle::BaseFont).GetNativeFont(); |
1077 } | 1077 } |
OLD | NEW |