OLD | NEW |
1 // Copyright (c) 2007-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2007-2009 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 "config.h" | 5 #include "config.h" |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
10 #include "CSSStyleSelector.h" | 10 #include "CSSStyleSelector.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 WebCore::RenderStyle* style = GetTextFieldStyle(); | 228 WebCore::RenderStyle* style = GetTextFieldStyle(); |
229 return style ? webview_->theme()->popupInternalPaddingRight(style) : 0; | 229 return style ? webview_->theme()->popupInternalPaddingRight(style) : 0; |
230 } | 230 } |
231 virtual int listSize() const { | 231 virtual int listSize() const { |
232 return suggestions_.size(); | 232 return suggestions_.size(); |
233 } | 233 } |
234 virtual int selectedIndex() const { | 234 virtual int selectedIndex() const { |
235 return selected_index_; | 235 return selected_index_; |
236 } | 236 } |
237 virtual void popupDidHide() { | 237 virtual void popupDidHide() { |
238 hidePopup(); | |
239 } | |
240 virtual void hidePopup() { | |
241 webview_->HideAutoCompletePopup(); | 238 webview_->HideAutoCompletePopup(); |
242 } | 239 } |
243 virtual bool itemIsSeparator(unsigned listIndex) const { | 240 virtual bool itemIsSeparator(unsigned listIndex) const { |
244 return false; | 241 return false; |
245 } | 242 } |
246 virtual bool itemIsLabel(unsigned listIndex) const { | 243 virtual bool itemIsLabel(unsigned listIndex) const { |
247 return false; | 244 return false; |
248 } | 245 } |
249 virtual bool itemIsSelected(unsigned listIndex) const { | 246 virtual bool itemIsSelected(unsigned listIndex) const { |
250 return false; | 247 return false; |
251 } | 248 } |
252 virtual bool shouldPopOver() const { | 249 virtual bool shouldPopOver() const { |
253 return false; | 250 return false; |
254 } | 251 } |
255 virtual bool valueShouldChangeOnHotTrack() const { | 252 virtual bool valueShouldChangeOnHotTrack() const { |
256 return false; | 253 return false; |
257 } | 254 } |
258 | 255 |
| 256 virtual void setTextFromItem(unsigned listIndex) { |
| 257 text_field_->setValue(suggestions_[listIndex]); |
| 258 } |
| 259 |
259 virtual FontSelector* fontSelector() const { | 260 virtual FontSelector* fontSelector() const { |
260 return text_field_->document()->styleSelector()->fontSelector(); | 261 return text_field_->document()->styleSelector()->fontSelector(); |
261 } | 262 } |
262 | 263 |
263 virtual void setTextFromItem(unsigned listIndex) { | |
264 text_field_->setValue(suggestions_[listIndex]); | |
265 } | |
266 | |
267 virtual HostWindow* hostWindow() const { | 264 virtual HostWindow* hostWindow() const { |
268 return text_field_->document()->view()->hostWindow(); | 265 return text_field_->document()->view()->hostWindow(); |
269 } | 266 } |
270 | 267 |
271 virtual PassRefPtr<Scrollbar> createScrollbar( | 268 virtual PassRefPtr<Scrollbar> createScrollbar( |
272 ScrollbarClient* client, | 269 ScrollbarClient* client, |
273 ScrollbarOrientation orientation, | 270 ScrollbarOrientation orientation, |
274 ScrollbarControlSize size) { | 271 ScrollbarControlSize size) { |
275 RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(client, | 272 RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(client, |
276 orientation, | 273 orientation, |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 return spelling_panel_is_visible_; | 1933 return spelling_panel_is_visible_; |
1937 } | 1934 } |
1938 | 1935 |
1939 void WebViewImpl::SetTabsToLinks(bool enable) { | 1936 void WebViewImpl::SetTabsToLinks(bool enable) { |
1940 tabs_to_links_ = enable; | 1937 tabs_to_links_ = enable; |
1941 } | 1938 } |
1942 | 1939 |
1943 bool WebViewImpl::GetTabsToLinks() const { | 1940 bool WebViewImpl::GetTabsToLinks() const { |
1944 return tabs_to_links_; | 1941 return tabs_to_links_; |
1945 } | 1942 } |
OLD | NEW |