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/omnibox/omnibox_view_views.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/property_bag.h" | 8 #include "base/property_bag.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "ui/base/resource/resource_bundle.h" | 42 #include "ui/base/resource/resource_bundle.h" |
43 #include "ui/gfx/canvas.h" | 43 #include "ui/gfx/canvas.h" |
44 #include "ui/gfx/font.h" | 44 #include "ui/gfx/font.h" |
45 #include "ui/gfx/render_text.h" | 45 #include "ui/gfx/render_text.h" |
46 #include "ui/views/border.h" | 46 #include "ui/views/border.h" |
47 #include "ui/views/controls/textfield/textfield.h" | 47 #include "ui/views/controls/textfield/textfield.h" |
48 #include "ui/views/events/event.h" | 48 #include "ui/views/events/event.h" |
49 #include "ui/views/ime/input_method.h" | 49 #include "ui/views/ime/input_method.h" |
50 #include "ui/views/layout/fill_layout.h" | 50 #include "ui/views/layout/fill_layout.h" |
51 #include "ui/views/views_delegate.h" | 51 #include "ui/views/views_delegate.h" |
| 52 #include "ui/views/widget/widget.h" |
52 | 53 |
53 #if defined(USE_AURA) | 54 #if defined(USE_AURA) |
54 #include "ui/aura/focus_manager.h" | 55 #include "ui/aura/focus_manager.h" |
55 #include "ui/aura/root_window.h" | 56 #include "ui/aura/root_window.h" |
56 #include "ui/compositor/layer.h" | 57 #include "ui/compositor/layer.h" |
57 #endif | 58 #endif |
58 | 59 |
59 using content::WebContents; | 60 using content::WebContents; |
60 | 61 |
61 namespace { | 62 namespace { |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 const ui::Range& range) { | 957 const ui::Range& range) { |
957 if (text != GetText()) | 958 if (text != GetText()) |
958 textfield_->SetText(text); | 959 textfield_->SetText(text); |
959 textfield_->SelectRange(range); | 960 textfield_->SelectRange(range); |
960 } | 961 } |
961 | 962 |
962 string16 OmniboxViewViews::GetSelectedText() const { | 963 string16 OmniboxViewViews::GetSelectedText() const { |
963 // TODO(oshima): Support instant, IME. | 964 // TODO(oshima): Support instant, IME. |
964 return textfield_->GetSelectedText(); | 965 return textfield_->GetSelectedText(); |
965 } | 966 } |
OLD | NEW |