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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_types.cc

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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/autofill/autofill_dialog_types.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 12 matching lines...) Expand all
23 23
24 DialogNotification::DialogNotification(Type type, const string16& display_text) 24 DialogNotification::DialogNotification(Type type, const string16& display_text)
25 : type_(type), 25 : type_(type),
26 display_text_(display_text), 26 display_text_(display_text),
27 checked_(false), 27 checked_(false),
28 interactive_(true) { 28 interactive_(true) {
29 // If there's a range separated by bars, mark that as the anchor text. 29 // If there's a range separated by bars, mark that as the anchor text.
30 std::vector<base::string16> pieces; 30 std::vector<base::string16> pieces;
31 base::SplitStringDontTrim(display_text, kRangeSeparator, &pieces); 31 base::SplitStringDontTrim(display_text, kRangeSeparator, &pieces);
32 if (pieces.size() > 1) { 32 if (pieces.size() > 1) {
33 link_range_ = ui::Range(pieces[0].size(), pieces[1].size()); 33 link_range_ = gfx::Range(pieces[0].size(), pieces[1].size());
34 display_text_ = JoinString(pieces, string16()); 34 display_text_ = JoinString(pieces, string16());
35 } 35 }
36 } 36 }
37 37
38 DialogNotification::~DialogNotification() {} 38 DialogNotification::~DialogNotification() {}
39 39
40 SkColor DialogNotification::GetBackgroundColor() const { 40 SkColor DialogNotification::GetBackgroundColor() const {
41 switch (type_) { 41 switch (type_) {
42 case DialogNotification::EXPLANATORY_MESSAGE: 42 case DialogNotification::EXPLANATORY_MESSAGE:
43 case DialogNotification::WALLET_USAGE_CONFIRMATION: 43 case DialogNotification::WALLET_USAGE_CONFIRMATION:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 extra_icon(extra_icon) {} 122 extra_icon(extra_icon) {}
123 SuggestionState::~SuggestionState() {} 123 SuggestionState::~SuggestionState() {}
124 124
125 DialogOverlayString::DialogOverlayString() : alignment(gfx::ALIGN_LEFT) {} 125 DialogOverlayString::DialogOverlayString() : alignment(gfx::ALIGN_LEFT) {}
126 DialogOverlayString::~DialogOverlayString() {} 126 DialogOverlayString::~DialogOverlayString() {}
127 127
128 DialogOverlayState::DialogOverlayState() {} 128 DialogOverlayState::DialogOverlayState() {}
129 DialogOverlayState::~DialogOverlayState() {} 129 DialogOverlayState::~DialogOverlayState() {}
130 130
131 } // namespace autofill 131 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_types.h ('k') | chrome/browser/ui/autofill/autofill_dialog_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698