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

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

Issue 1543203002: Remove a variety of no-longer-used query params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/app/chrome_command_ids.h" 14 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/command_updater.h" 15 #include "chrome/browser/command_updater.h"
16 #include "chrome/browser/defaults.h" 16 #include "chrome/browser/defaults.h"
17 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" 17 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
18 #include "chrome/browser/extensions/extension_action.h" 18 #include "chrome/browser/extensions/extension_action.h"
19 #include "chrome/browser/extensions/extension_action_manager.h" 19 #include "chrome/browser/extensions/extension_action_manager.h"
20 #include "chrome/browser/extensions/extension_util.h" 20 #include "chrome/browser/extensions/extension_util.h"
21 #include "chrome/browser/extensions/location_bar_controller.h" 21 #include "chrome/browser/extensions/location_bar_controller.h"
22 #include "chrome/browser/extensions/tab_helper.h" 22 #include "chrome/browser/extensions/tab_helper.h"
23 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/search/instant_service.h" 24 #include "chrome/browser/search/instant_service.h"
samarth 2015/12/28 20:12:22 You can kill these includes.
Peter Kasting 2016/01/04 21:47:11 Done.
25 #include "chrome/browser/search/instant_service_factory.h" 25 #include "chrome/browser/search/instant_service_factory.h"
26 #include "chrome/browser/search/search.h" 26 #include "chrome/browser/search/search.h"
27 #include "chrome/browser/search_engines/template_url_service_factory.h" 27 #include "chrome/browser/search_engines/template_url_service_factory.h"
28 #include "chrome/browser/translate/chrome_translate_client.h" 28 #include "chrome/browser/translate/chrome_translate_client.h"
29 #include "chrome/browser/translate/translate_service.h" 29 #include "chrome/browser/translate/translate_service.h"
30 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h" 30 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h"
31 #include "chrome/browser/ui/browser.h" 31 #include "chrome/browser/ui/browser.h"
32 #include "chrome/browser/ui/browser_finder.h" 32 #include "chrome/browser/ui/browser_finder.h"
33 #include "chrome/browser/ui/browser_instant_controller.h" 33 #include "chrome/browser/ui/browser_instant_controller.h"
34 #include "chrome/browser/ui/browser_window.h" 34 #include "chrome/browser/ui/browser_window.h"
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 } 1240 }
1241 1241
1242 //////////////////////////////////////////////////////////////////////////////// 1242 ////////////////////////////////////////////////////////////////////////////////
1243 // LocationBarView, private views::View implementation: 1243 // LocationBarView, private views::View implementation:
1244 1244
1245 const char* LocationBarView::GetClassName() const { 1245 const char* LocationBarView::GetClassName() const {
1246 return kViewClassName; 1246 return kViewClassName;
1247 } 1247 }
1248 1248
1249 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 1249 void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
1250 InstantService* instant_service =
1251 InstantServiceFactory::GetForProfile(profile());
1252 if (instant_service)
1253 instant_service->OnOmniboxStartMarginChanged(bounds().x());
1254
1255 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view(); 1250 OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view();
1256 if (popup->IsOpen()) 1251 if (popup->IsOpen())
1257 popup->UpdatePopupAppearance(); 1252 popup->UpdatePopupAppearance();
1258 } 1253 }
1259 1254
1260 void LocationBarView::OnFocus() { 1255 void LocationBarView::OnFocus() {
1261 // Explicitly focus the omnibox so a focus ring will be displayed around it on 1256 // Explicitly focus the omnibox so a focus ring will be displayed around it on
1262 // Windows. 1257 // Windows.
1263 omnibox_view_->SetFocus(); 1258 omnibox_view_->SetFocus();
1264 } 1259 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 // LocationBarView, private TemplateURLServiceObserver implementation: 1380 // LocationBarView, private TemplateURLServiceObserver implementation:
1386 1381
1387 void LocationBarView::OnTemplateURLServiceChanged() { 1382 void LocationBarView::OnTemplateURLServiceChanged() {
1388 template_url_service_->RemoveObserver(this); 1383 template_url_service_->RemoveObserver(this);
1389 template_url_service_ = nullptr; 1384 template_url_service_ = nullptr;
1390 // If the browser is no longer active, let's not show the info bubble, as this 1385 // If the browser is no longer active, let's not show the info bubble, as this
1391 // would make the browser the active window again. 1386 // would make the browser the active window again.
1392 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1387 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1393 ShowFirstRunBubble(); 1388 ShowFirstRunBubble();
1394 } 1389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698