| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 15 #include "content/public/browser/web_contents_user_data.h" | 15 #include "content/public/browser/web_contents_user_data.h" |
| 16 #include "ui/base/range/range.h" | |
| 17 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
| 17 #include "ui/gfx/range/range.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class WebContents; | 20 class WebContents; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace user_prefs { | 23 namespace user_prefs { |
| 24 class PrefRegistrySyncable; | 24 class PrefRegistrySyncable; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace autofill { | 27 namespace autofill { |
| 28 | 28 |
| 29 class GeneratedCreditCardBubbleView; | 29 class GeneratedCreditCardBubbleView; |
| 30 | 30 |
| 31 // A simple struct of text highlighting range information. If |is_link| is true | 31 // A simple struct of text highlighting range information. If |is_link| is true |
| 32 // this portion of the text should be clickable (and trigger |OnLinkClicked()|). | 32 // this portion of the text should be clickable (and trigger |OnLinkClicked()|). |
| 33 // If |is_link| is false, the text denoted by |range| should be bolded. | 33 // If |is_link| is false, the text denoted by |range| should be bolded. |
| 34 struct TextRange { | 34 struct TextRange { |
| 35 // The range of text this TextRange applies to (start and end). | 35 // The range of text this TextRange applies to (start and end). |
| 36 ui::Range range; | 36 gfx::Range range; |
| 37 // Whether this text range should be styled like a link (e.g. clickable). | 37 // Whether this text range should be styled like a link (e.g. clickable). |
| 38 bool is_link; | 38 bool is_link; |
| 39 // An equality operator for testing. | 39 // An equality operator for testing. |
| 40 bool operator==(const TextRange& other) const; | 40 bool operator==(const TextRange& other) const; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 //////////////////////////////////////////////////////////////////////////////// | 43 //////////////////////////////////////////////////////////////////////////////// |
| 44 // | 44 // |
| 45 // GeneratedCreditCardBubbleController | 45 // GeneratedCreditCardBubbleController |
| 46 // | 46 // |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 // A weak pointer factory for |Create()|. | 161 // A weak pointer factory for |Create()|. |
| 162 base::WeakPtrFactory<GeneratedCreditCardBubbleController> weak_ptr_factory_; | 162 base::WeakPtrFactory<GeneratedCreditCardBubbleController> weak_ptr_factory_; |
| 163 | 163 |
| 164 DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleController); | 164 DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleController); |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace autofill | 167 } // namespace autofill |
| 168 | 168 |
| 169 #endif // CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ | 169 #endif // CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |