OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/i18n/rtl.h" |
10 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
12 #include "components/autofill/browser/autofill_manager_delegate.h" | 13 #include "components/autofill/browser/autofill_manager_delegate.h" |
13 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
14 #include "content/public/browser/web_contents_user_data.h" | 15 #include "content/public/browser/web_contents_user_data.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 struct FrameNavigateParams; | 18 struct FrameNavigateParams; |
18 struct LoadCommittedDetails; | 19 struct LoadCommittedDetails; |
19 class WebContents; | 20 class WebContents; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const base::Callback<void(bool)>& callback) OVERRIDE; | 54 const base::Callback<void(bool)>& callback) OVERRIDE; |
54 virtual void HideAutocheckoutBubble() OVERRIDE; | 55 virtual void HideAutocheckoutBubble() OVERRIDE; |
55 virtual void ShowRequestAutocompleteDialog( | 56 virtual void ShowRequestAutocompleteDialog( |
56 const FormData& form, | 57 const FormData& form, |
57 const GURL& source_url, | 58 const GURL& source_url, |
58 DialogType dialog_type, | 59 DialogType dialog_type, |
59 const base::Callback<void(const FormStructure*, | 60 const base::Callback<void(const FormStructure*, |
60 const std::string&)>& callback) OVERRIDE; | 61 const std::string&)>& callback) OVERRIDE; |
61 virtual void ShowAutofillPopup( | 62 virtual void ShowAutofillPopup( |
62 const gfx::RectF& element_bounds, | 63 const gfx::RectF& element_bounds, |
| 64 base::i18n::TextDirection text_direction, |
63 const std::vector<string16>& values, | 65 const std::vector<string16>& values, |
64 const std::vector<string16>& labels, | 66 const std::vector<string16>& labels, |
65 const std::vector<string16>& icons, | 67 const std::vector<string16>& icons, |
66 const std::vector<int>& identifiers, | 68 const std::vector<int>& identifiers, |
67 base::WeakPtr<AutofillPopupDelegate> delegate) OVERRIDE; | 69 base::WeakPtr<AutofillPopupDelegate> delegate) OVERRIDE; |
68 virtual void HideAutofillPopup() OVERRIDE; | 70 virtual void HideAutofillPopup() OVERRIDE; |
69 virtual void UpdateProgressBar(double value) OVERRIDE; | 71 virtual void UpdateProgressBar(double value) OVERRIDE; |
70 | 72 |
71 // content::WebContentsObserver implementation. | 73 // content::WebContentsObserver implementation. |
72 virtual void DidNavigateMainFrame( | 74 virtual void DidNavigateMainFrame( |
73 const content::LoadCommittedDetails& details, | 75 const content::LoadCommittedDetails& details, |
74 const content::FrameNavigateParams& params) OVERRIDE; | 76 const content::FrameNavigateParams& params) OVERRIDE; |
75 | 77 |
76 private: | 78 private: |
77 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); | 79 explicit TabAutofillManagerDelegate(content::WebContents* web_contents); |
78 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; | 80 friend class content::WebContentsUserData<TabAutofillManagerDelegate>; |
79 | 81 |
80 content::WebContents* const web_contents_; | 82 content::WebContents* const web_contents_; |
81 base::WeakPtr<AutofillDialogControllerImpl> dialog_controller_; | 83 base::WeakPtr<AutofillDialogControllerImpl> dialog_controller_; |
82 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; | 84 base::WeakPtr<AutocheckoutBubble> autocheckout_bubble_; |
83 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 85 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
84 | 86 |
85 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(TabAutofillManagerDelegate); |
86 }; | 88 }; |
87 | 89 |
88 } // namespace autofill | 90 } // namespace autofill |
89 | 91 |
90 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ | 92 #endif // CHROME_BROWSER_UI_AUTOFILL_TAB_AUTOFILL_MANAGER_DELEGATE_H_ |
OLD | NEW |