Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10836031: Remove Instant v1 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update history, title, favicon Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 if (views::FocusManager::IsTabTraversalKeyEvent(event)) { 1220 if (views::FocusManager::IsTabTraversalKeyEvent(event)) {
1222 if (location_entry_->model()->popup_model()->IsOpen()) { 1221 if (location_entry_->model()->popup_model()->IsOpen()) {
1223 // Return true so that the edit sees the tab and moves the selection. 1222 // Return true so that the edit sees the tab and moves the selection.
1224 return true; 1223 return true;
1225 } 1224 }
1226 if (keyword_hint_view_->visible() && !event.IsShiftDown()) { 1225 if (keyword_hint_view_->visible() && !event.IsShiftDown()) {
1227 // Return true so the edit gets the tab event and enters keyword mode. 1226 // Return true so the edit gets the tab event and enters keyword mode.
1228 return true; 1227 return true;
1229 } 1228 }
1230 1229
1231 // Tab while showing instant commits instant immediately. 1230 // Tab while showing Instant commits instant immediately.
1232 // Return true so that focus traversal isn't attempted. The edit ends 1231 // Return true so that focus traversal isn't attempted. The edit ends
1233 // up doing nothing in this case. 1232 // up doing nothing in this case.
1234 if (location_entry_->model()->AcceptCurrentInstantPreview()) 1233 if (location_entry_->model()->AcceptCurrentInstantPreview())
1235 return true; 1234 return true;
1236 } 1235 }
1237 1236
1238 #if defined(USE_AURA) 1237 #if defined(USE_AURA)
1239 NOTIMPLEMENTED(); 1238 NOTIMPLEMENTED();
1240 return false; 1239 return false;
1241 #else 1240 #else
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 } 1496 }
1498 1497
1499 void LocationBarView::CleanupFadeAnimation() { 1498 void LocationBarView::CleanupFadeAnimation() {
1500 // Since we're no longer animating we don't need our layer. 1499 // Since we're no longer animating we don't need our layer.
1501 SetPaintToLayer(false); 1500 SetPaintToLayer(false);
1502 // Bubble labels don't need a transparent background anymore. 1501 // Bubble labels don't need a transparent background anymore.
1503 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1502 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1504 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1503 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1505 } 1504 }
1506 #endif // USE_AURA 1505 #endif // USE_AURA
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/suggested_text_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698