| 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/location_bar/location_bar_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
| 13 #include "chrome/browser/alternate_nav_url_fetcher.h" | 13 #include "chrome/browser/alternate_nav_url_fetcher.h" |
| 14 #include "chrome/browser/chrome_to_mobile_service.h" | 14 #include "chrome/browser/chrome_to_mobile_service.h" |
| 15 #include "chrome/browser/chrome_to_mobile_service_factory.h" | 15 #include "chrome/browser/chrome_to_mobile_service_factory.h" |
| 16 #include "chrome/browser/command_updater.h" | 16 #include "chrome/browser/command_updater.h" |
| 17 #include "chrome/browser/defaults.h" | 17 #include "chrome/browser/defaults.h" |
| 18 #include "chrome/browser/extensions/extension_service.h" | 18 #include "chrome/browser/extensions/extension_service.h" |
| 19 #include "chrome/browser/extensions/extension_system.h" | 19 #include "chrome/browser/extensions/extension_system.h" |
| 20 #include "chrome/browser/extensions/location_bar_controller.h" | 20 #include "chrome/browser/extensions/location_bar_controller.h" |
| 21 #include "chrome/browser/extensions/tab_helper.h" | 21 #include "chrome/browser/extensions/tab_helper.h" |
| 22 #include "chrome/browser/favicon/favicon_tab_helper.h" | 22 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 23 #include "chrome/browser/instant/instant_controller.h" | |
| 24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/search_engines/template_url.h" | 24 #include "chrome/browser/search_engines/template_url.h" |
| 26 #include "chrome/browser/search_engines/template_url_service.h" | 25 #include "chrome/browser/search_engines/template_url_service.h" |
| 27 #include "chrome/browser/search_engines/template_url_service_factory.h" | 26 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 28 #include "chrome/browser/ui/browser.h" | 27 #include "chrome/browser/ui/browser.h" |
| 29 #include "chrome/browser/ui/browser_finder.h" | 28 #include "chrome/browser/ui/browser_finder.h" |
| 30 #include "chrome/browser/ui/browser_tabstrip.h" | 29 #include "chrome/browser/ui/browser_tabstrip.h" |
| 31 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 30 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 32 #include "chrome/browser/ui/search/search.h" | 31 #include "chrome/browser/ui/search/search.h" |
| 33 #include "chrome/browser/ui/search/search_model.h" | 32 #include "chrome/browser/ui/search/search_model.h" |
| (...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 if (views::FocusManager::IsTabTraversalKeyEvent(event)) { | 1252 if (views::FocusManager::IsTabTraversalKeyEvent(event)) { |
| 1254 if (location_entry_->model()->popup_model()->IsOpen()) { | 1253 if (location_entry_->model()->popup_model()->IsOpen()) { |
| 1255 // Return true so that the edit sees the tab and moves the selection. | 1254 // Return true so that the edit sees the tab and moves the selection. |
| 1256 return true; | 1255 return true; |
| 1257 } | 1256 } |
| 1258 if (keyword_hint_view_->visible() && !event.IsShiftDown()) { | 1257 if (keyword_hint_view_->visible() && !event.IsShiftDown()) { |
| 1259 // Return true so the edit gets the tab event and enters keyword mode. | 1258 // Return true so the edit gets the tab event and enters keyword mode. |
| 1260 return true; | 1259 return true; |
| 1261 } | 1260 } |
| 1262 | 1261 |
| 1263 // Tab while showing instant commits instant immediately. | 1262 // Tab while showing Instant commits instant immediately. |
| 1264 // Return true so that focus traversal isn't attempted. The edit ends | 1263 // Return true so that focus traversal isn't attempted. The edit ends |
| 1265 // up doing nothing in this case. | 1264 // up doing nothing in this case. |
| 1266 if (location_entry_->model()->AcceptCurrentInstantPreview()) | 1265 if (location_entry_->model()->AcceptCurrentInstantPreview()) |
| 1267 return true; | 1266 return true; |
| 1268 } | 1267 } |
| 1269 | 1268 |
| 1270 #if defined(USE_AURA) | 1269 #if defined(USE_AURA) |
| 1271 NOTIMPLEMENTED(); | 1270 NOTIMPLEMENTED(); |
| 1272 return false; | 1271 return false; |
| 1273 #else | 1272 #else |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 } | 1528 } |
| 1530 | 1529 |
| 1531 void LocationBarView::CleanupFadeAnimation() { | 1530 void LocationBarView::CleanupFadeAnimation() { |
| 1532 // Since we're no longer animating we don't need our layer. | 1531 // Since we're no longer animating we don't need our layer. |
| 1533 SetPaintToLayer(false); | 1532 SetPaintToLayer(false); |
| 1534 // Bubble labels don't need a transparent background anymore. | 1533 // Bubble labels don't need a transparent background anymore. |
| 1535 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1534 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1536 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1535 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1537 } | 1536 } |
| 1538 #endif // USE_AURA | 1537 #endif // USE_AURA |
| OLD | NEW |