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

Side by Side Diff: components/autofill/content/browser/autocheckout_manager.h

Issue 16611003: Ignore ajax on specified pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit tests Created 7 years, 6 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 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 COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/gtest_prod_util.h"
Ilya Sherman 2013/06/19 23:25:13 nit: No longer needed.
Dane Wallinga 2013/06/20 19:46:41 Done.
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
15 #include "components/autofill/content/browser/autocheckout_page_meta_data.h" 16 #include "components/autofill/content/browser/autocheckout_page_meta_data.h"
16 #include "components/autofill/core/common/autocheckout_status.h" 17 #include "components/autofill/core/common/autocheckout_status.h"
17 18
18 class GURL; 19 class GURL;
19 20
20 namespace content { 21 namespace content {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // |status| is the reason for the failure. 55 // |status| is the reason for the failure.
55 void OnClickFailed(AutocheckoutStatus status); 56 void OnClickFailed(AutocheckoutStatus status);
56 57
57 // Sets |page_meta_data_| with the meta data for the current page. 58 // Sets |page_meta_data_| with the meta data for the current page.
58 void OnLoadedPageMetaData( 59 void OnLoadedPageMetaData(
59 scoped_ptr<AutocheckoutPageMetaData> page_meta_data); 60 scoped_ptr<AutocheckoutPageMetaData> page_meta_data);
60 61
61 // Called when a page containing forms is loaded. 62 // Called when a page containing forms is loaded.
62 void OnFormsSeen(); 63 void OnFormsSeen();
63 64
65 // Whether ajax on the current page should be ignored during
66 // an Autocheckout flow.
67 bool ShouldIgnoreAjax();
68
64 // Causes the Autocheckout bubble to be displayed if the user hasn't seen it 69 // Causes the Autocheckout bubble to be displayed if the user hasn't seen it
65 // yet for the current page. |frame_url| is the page where Autocheckout is 70 // yet for the current page. |frame_url| is the page where Autocheckout is
66 // being initiated. |ssl_status| is the SSL status of the page. |bounding_box| 71 // being initiated. |ssl_status| is the SSL status of the page. |bounding_box|
67 // is the bounding box of the input field in focus. 72 // is the bounding box of the input field in focus.
68 virtual void MaybeShowAutocheckoutBubble(const GURL& frame_url, 73 virtual void MaybeShowAutocheckoutBubble(const GURL& frame_url,
69 const content::SSLStatus& ssl_status, 74 const content::SSLStatus& ssl_status,
70 const gfx::RectF& bounding_box); 75 const gfx::RectF& bounding_box);
71 76
72 bool is_autocheckout_bubble_showing() const { 77 bool is_autocheckout_bubble_showing() const {
73 return is_autocheckout_bubble_showing_; 78 return is_autocheckout_bubble_showing_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_; 156 base::WeakPtrFactory<AutocheckoutManager> weak_ptr_factory_;
152 157
153 base::ThreadChecker thread_checker_; 158 base::ThreadChecker thread_checker_;
154 159
155 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager); 160 DISALLOW_COPY_AND_ASSIGN(AutocheckoutManager);
156 }; 161 };
157 162
158 } // namespace autofill 163 } // namespace autofill
159 164
160 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_ 165 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698