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

Side by Side Diff: components/omnibox/browser/omnibox_view.cc

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps Created 3 years, 9 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 // This file defines helper functions shared by the various implementations 5 // This file defines helper functions shared by the various implementations
6 // of OmniboxView. 6 // of OmniboxView.
7 7
8 #include "components/omnibox/browser/omnibox_view.h" 8 #include "components/omnibox/browser/omnibox_view.h"
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "components/grit/components_scaled_resources.h" 16 #include "components/grit/components_scaled_resources.h"
17 #include "components/omnibox/browser/autocomplete_match.h" 17 #include "components/omnibox/browser/autocomplete_match.h"
18 #include "components/omnibox/browser/omnibox_client.h" 18 #include "components/omnibox/browser/omnibox_client.h"
19 #include "components/omnibox/browser/omnibox_edit_controller.h" 19 #include "components/omnibox/browser/omnibox_edit_controller.h"
20 #include "components/omnibox/browser/omnibox_edit_model.h" 20 #include "components/omnibox/browser/omnibox_edit_model.h"
21 #include "components/toolbar/toolbar_model.h" 21 #include "components/toolbar/toolbar_model.h"
22 #include "extensions/common/constants.h" 22 #include "extensions/common/constants.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/gfx/vector_icons_public.h"
25 24
26 // static 25 // static
27 base::string16 OmniboxView::StripJavascriptSchemas(const base::string16& text) { 26 base::string16 OmniboxView::StripJavascriptSchemas(const base::string16& text) {
28 const base::string16 kJsPrefix( 27 const base::string16 kJsPrefix(
29 base::ASCIIToUTF16(url::kJavaScriptScheme) + base::ASCIIToUTF16(":")); 28 base::ASCIIToUTF16(url::kJavaScriptScheme) + base::ASCIIToUTF16(":"));
30 base::string16 out(text); 29 base::string16 out(text);
31 while (base::StartsWith(out, kJsPrefix, 30 while (base::StartsWith(out, kJsPrefix,
32 base::CompareCase::INSENSITIVE_ASCII)) { 31 base::CompareCase::INSENSITIVE_ASCII)) {
33 base::TrimWhitespace(out.substr(kJsPrefix.length()), base::TRIM_LEADING, 32 base::TrimWhitespace(out.substr(kJsPrefix.length()), base::TRIM_LEADING,
34 &out); 33 &out);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 case ALL_BUT_HOST: 234 case ALL_BUT_HOST:
236 SetEmphasis(false, gfx::Range::InvalidRange()); 235 SetEmphasis(false, gfx::Range::InvalidRange());
237 SetEmphasis(true, gfx::Range(host.begin, host.end())); 236 SetEmphasis(true, gfx::Range(host.begin, host.end()));
238 break; 237 break;
239 } 238 }
240 239
241 // Emphasize the scheme for security UI display purposes (if necessary). 240 // Emphasize the scheme for security UI display purposes (if necessary).
242 if (!model()->user_input_in_progress() && scheme_range.IsValid()) 241 if (!model()->user_input_in_progress() && scheme_range.IsValid())
243 UpdateSchemeStyle(scheme_range); 242 UpdateSchemeStyle(scheme_range);
244 } 243 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/autocomplete_match.cc ('k') | components/omnibox/browser/vector_icons/search.icon » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698