| 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/frame/browser_root_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_root_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/autocomplete/autocomplete.h" | 8 #include "chrome/browser/autocomplete/autocomplete.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 9 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 views::View* handler = touch_pressed_handler(); | 41 views::View* handler = touch_pressed_handler(); |
| 42 if (!handler) | 42 if (!handler) |
| 43 return status; | 43 return status; |
| 44 views::TextInputClient* text_input_client = handler->GetTextInputClient(); | 44 views::TextInputClient* text_input_client = handler->GetTextInputClient(); |
| 45 if (!text_input_client) | 45 if (!text_input_client) |
| 46 return status; | 46 return status; |
| 47 ui::TextInputType text_input_type = text_input_client->GetTextInputType(); | 47 ui::TextInputType text_input_type = text_input_client->GetTextInputType(); |
| 48 if (text_input_type != ui::TEXT_INPUT_TYPE_NONE) { | 48 if (text_input_type != ui::TEXT_INPUT_TYPE_NONE) { |
| 49 NotificationService::current()->Notify( | 49 NotificationService::current()->Notify( |
| 50 NotificationType::EDITABLE_ELEMENT_TOUCHED, | 50 chrome::EDITABLE_ELEMENT_TOUCHED, |
| 51 Source<View>(this), | 51 Source<View>(this), |
| 52 Details<ui::TextInputType>(&text_input_type)); | 52 Details<ui::TextInputType>(&text_input_type)); |
| 53 } | 53 } |
| 54 return status; | 54 return status; |
| 55 } | 55 } |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 bool BrowserRootView::GetDropFormats( | 58 bool BrowserRootView::GetDropFormats( |
| 59 int* formats, | 59 int* formats, |
| 60 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { | 60 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 AutocompleteMatch match; | 186 AutocompleteMatch match; |
| 187 browser_view_->browser()->profile()->GetAutocompleteClassifier()->Classify( | 187 browser_view_->browser()->profile()->GetAutocompleteClassifier()->Classify( |
| 188 text, string16(), false, false, &match, NULL); | 188 text, string16(), false, false, &match, NULL); |
| 189 if (!match.destination_url.is_valid()) | 189 if (!match.destination_url.is_valid()) |
| 190 return false; | 190 return false; |
| 191 | 191 |
| 192 if (url) | 192 if (url) |
| 193 *url = match.destination_url; | 193 *url = match.destination_url; |
| 194 return true; | 194 return true; |
| 195 } | 195 } |
| OLD | NEW |