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

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

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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/command_line.h" 10 #include "base/command_line.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/prefs/pref_service.h"
12 #include "base/stl_util.h" 13 #include "base/stl_util.h"
13 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
14 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/command_updater.h" 16 #include "chrome/browser/command_updater.h"
16 #include "chrome/browser/defaults.h" 17 #include "chrome/browser/defaults.h"
17 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" 18 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
18 #include "chrome/browser/extensions/location_bar_controller.h" 19 #include "chrome/browser/extensions/location_bar_controller.h"
19 #include "chrome/browser/extensions/script_bubble_controller.h" 20 #include "chrome/browser/extensions/script_bubble_controller.h"
20 #include "chrome/browser/extensions/tab_helper.h" 21 #include "chrome/browser/extensions/tab_helper.h"
21 #include "chrome/browser/favicon/favicon_tab_helper.h" 22 #include "chrome/browser/favicon/favicon_tab_helper.h"
22 #include "chrome/browser/prefs/pref_service.h"
23 #include "chrome/browser/profiles/profile.h" 23 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/search_engines/template_url.h" 24 #include "chrome/browser/search_engines/template_url.h"
25 #include "chrome/browser/search_engines/template_url_service.h" 25 #include "chrome/browser/search_engines/template_url_service.h"
26 #include "chrome/browser/search_engines/template_url_service_factory.h" 26 #include "chrome/browser/search_engines/template_url_service_factory.h"
27 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
28 #include "chrome/browser/ui/browser_finder.h" 28 #include "chrome/browser/ui/browser_finder.h"
29 #include "chrome/browser/ui/browser_instant_controller.h" 29 #include "chrome/browser/ui/browser_instant_controller.h"
30 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h" 30 #include "chrome/browser/ui/omnibox/alternate_nav_url_fetcher.h"
31 #include "chrome/browser/ui/omnibox/location_bar_util.h" 31 #include "chrome/browser/ui/omnibox/location_bar_util.h"
32 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 32 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 int LocationBarView::GetInternalHeight(bool use_preferred_size) { 1489 int LocationBarView::GetInternalHeight(bool use_preferred_size) {
1490 int total_height = 1490 int total_height =
1491 use_preferred_size ? GetPreferredSize().height() : height(); 1491 use_preferred_size ? GetPreferredSize().height() : height();
1492 return std::max(total_height - (kVerticalEdgeThickness * 2), 0); 1492 return std::max(total_height - (kVerticalEdgeThickness * 2), 0);
1493 } 1493 }
1494 1494
1495 bool LocationBarView::HasValidSuggestText() const { 1495 bool LocationBarView::HasValidSuggestText() const {
1496 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1496 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1497 !suggested_text_view_->text().empty(); 1497 !suggested_text_view_->text().empty();
1498 } 1498 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/home_button.cc ('k') | chrome/browser/ui/views/network_profile_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698