OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 class is used by the RenderView to interact with a PhishingClassifier. | 5 // This class is used by the RenderView to interact with a PhishingClassifier. |
6 | 6 |
7 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 7 #ifndef CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
8 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 8 #define CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // We ignore preliminary captures, since these happen before the page has | 52 // We ignore preliminary captures, since these happen before the page has |
53 // finished loading. | 53 // finished loading. |
54 void PageCaptured(string16* page_text, bool preliminary_capture); | 54 void PageCaptured(string16* page_text, bool preliminary_capture); |
55 | 55 |
56 // RenderViewObserver implementation, public for testing. | 56 // RenderViewObserver implementation, public for testing. |
57 | 57 |
58 // Called by the RenderView when a page has started loading in the given | 58 // Called by the RenderView when a page has started loading in the given |
59 // WebFrame. Typically, this will cause any pending classification to be | 59 // WebFrame. Typically, this will cause any pending classification to be |
60 // cancelled. However, if the navigation is within the same page, we | 60 // cancelled. However, if the navigation is within the same page, we |
61 // continue running the current classification. | 61 // continue running the current classification. |
62 virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, | 62 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, |
63 bool is_new_navigation) OVERRIDE; | 63 bool is_new_navigation) OVERRIDE; |
64 | 64 |
65 private: | 65 private: |
66 friend class PhishingClassifierDelegateTest; | 66 friend class PhishingClassifierDelegateTest; |
67 | 67 |
68 PhishingClassifierDelegate(content::RenderView* render_view, | 68 PhishingClassifierDelegate(content::RenderView* render_view, |
69 PhishingClassifier* classifier); | 69 PhishingClassifier* classifier); |
70 | 70 |
71 enum CancelClassificationReason { | 71 enum CancelClassificationReason { |
72 NAVIGATE_AWAY, | 72 NAVIGATE_AWAY, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 // Set to true if the classifier is currently running. | 137 // Set to true if the classifier is currently running. |
138 bool is_classifying_; | 138 bool is_classifying_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); | 140 DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace safe_browsing | 143 } // namespace safe_browsing |
144 | 144 |
145 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ | 145 #endif // CHROME_RENDERER_SAFE_BROWSING_PHISHING_CLASSIFIER_DELEGATE_H_ |
OLD | NEW |