| 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/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/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 : model_state(model_state), | 106 : model_state(model_state), |
| 107 view_state(view_state) { | 107 view_state(view_state) { |
| 108 } | 108 } |
| 109 | 109 |
| 110 const AutocompleteEditModel::State model_state; | 110 const AutocompleteEditModel::State model_state; |
| 111 const ViewState view_state; | 111 const ViewState view_state; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 // Returns a lazily initialized property bag accessor for saving our state in a | 114 // Returns a lazily initialized property bag accessor for saving our state in a |
| 115 // TabContents. | 115 // TabContents. |
| 116 PropertyAccessor<AutocompleteEditState>* GetStateAccessor() { | 116 base::PropertyAccessor<AutocompleteEditState>* GetStateAccessor() { |
| 117 CR_DEFINE_STATIC_LOCAL(PropertyAccessor<AutocompleteEditState>, state, ()); | 117 CR_DEFINE_STATIC_LOCAL( |
| 118 base::PropertyAccessor<AutocompleteEditState>, state, ()); |
| 118 return &state; | 119 return &state; |
| 119 } | 120 } |
| 120 | 121 |
| 121 // A convenience method for applying URL styles. | 122 // A convenience method for applying URL styles. |
| 122 void ApplyURLStyle(views::Textfield* textfield, | 123 void ApplyURLStyle(views::Textfield* textfield, |
| 123 size_t start, | 124 size_t start, |
| 124 size_t end, | 125 size_t end, |
| 125 SkColor color, | 126 SkColor color, |
| 126 bool strike) { | 127 bool strike) { |
| 127 gfx::StyleRange style; | 128 gfx::StyleRange style; |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, | 753 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, |
| 753 toolbar_model, | 754 toolbar_model, |
| 754 profile, | 755 profile, |
| 755 command_updater, | 756 command_updater, |
| 756 popup_window_mode, | 757 popup_window_mode, |
| 757 location_bar); | 758 location_bar); |
| 758 omnibox_view->Init(); | 759 omnibox_view->Init(); |
| 759 return omnibox_view; | 760 return omnibox_view; |
| 760 } | 761 } |
| 761 #endif | 762 #endif |
| OLD | NEW |