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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PropertyAccessor<AutocompleteEditState>* GetStateAccessor() { |
117 static PropertyAccessor<AutocompleteEditState> state; | 117 CR_DEFINE_STATIC_LOCAL(PropertyAccessor<AutocompleteEditState>, state, ()); |
118 return &state; | 118 return &state; |
119 } | 119 } |
120 | 120 |
121 // A convenience method for applying URL styles. | 121 // A convenience method for applying URL styles. |
122 void ApplyURLStyle(views::Textfield* textfield, | 122 void ApplyURLStyle(views::Textfield* textfield, |
123 size_t start, | 123 size_t start, |
124 size_t end, | 124 size_t end, |
125 SkColor color, | 125 SkColor color, |
126 bool strike) { | 126 bool strike) { |
127 gfx::StyleRange style; | 127 gfx::StyleRange style; |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, | 752 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, |
753 toolbar_model, | 753 toolbar_model, |
754 profile, | 754 profile, |
755 command_updater, | 755 command_updater, |
756 popup_window_mode, | 756 popup_window_mode, |
757 location_bar); | 757 location_bar); |
758 omnibox_view->Init(); | 758 omnibox_view->Init(); |
759 return omnibox_view; | 759 return omnibox_view; |
760 } | 760 } |
761 #endif | 761 #endif |
OLD | NEW |