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

Side by Side Diff: chrome/renderer/render_view.h

Issue 6250176: Make RenderView not have to know about how PhishingClassifierDelegate. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_
6 #define CHROME_RENDERER_RENDER_VIEW_H_ 6 #define CHROME_RENDERER_RENDER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 class PluginGroup; 101 class PluginGroup;
102 } // namespace npapi 102 } // namespace npapi
103 103
104 namespace ppapi { 104 namespace ppapi {
105 class PluginInstance; 105 class PluginInstance;
106 class FullscreenContainer; 106 class FullscreenContainer;
107 } // namespace ppapi 107 } // namespace ppapi
108 108
109 } // namespace webkit 109 } // namespace webkit
110 110
111 namespace safe_browsing {
112 class PhishingClassifierDelegate;
113 }
114
115 namespace webkit_glue { 111 namespace webkit_glue {
116 struct CustomContextMenuContext; 112 struct CustomContextMenuContext;
117 class ImageResourceFetcher; 113 class ImageResourceFetcher;
118 struct FileUploadData; 114 struct FileUploadData;
119 struct FormData; 115 struct FormData;
120 struct PasswordFormFillData; 116 struct PasswordFormFillData;
121 class ResourceFetcher; 117 class ResourceFetcher;
122 } 118 }
123 119
124 namespace WebKit { 120 namespace WebKit {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 224 }
229 225
230 const WebPreferences& webkit_preferences() const { 226 const WebPreferences& webkit_preferences() const {
231 return webkit_preferences_; 227 return webkit_preferences_;
232 } 228 }
233 229
234 void set_send_content_state_immediately(bool value) { 230 void set_send_content_state_immediately(bool value) {
235 send_content_state_immediately_ = value; 231 send_content_state_immediately_ = value;
236 } 232 }
237 233
238 // May be NULL if client-side phishing detection is disabled.
239 safe_browsing::PhishingClassifierDelegate*
240 phishing_classifier_delegate() const {
241 return phishing_delegate_.get();
242 }
243
244 // Returns true if we should display scrollbars for the given view size and 234 // Returns true if we should display scrollbars for the given view size and
245 // false if the scrollbars should be hidden. 235 // false if the scrollbars should be hidden.
246 bool should_display_scrollbars(int width, int height) const { 236 bool should_display_scrollbars(int width, int height) const {
247 return (!send_preferred_size_changes_ || 237 return (!send_preferred_size_changes_ ||
248 (disable_scrollbars_size_limit_.width() <= width || 238 (disable_scrollbars_size_limit_.width() <= width ||
249 disable_scrollbars_size_limit_.height() <= height)); 239 disable_scrollbars_size_limit_.height() <= height));
250 } 240 }
251 241
252 const SearchBox& searchbox() const { 242 const SearchBox& searchbox() const {
253 return search_box_; 243 return search_box_;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // IPC::Channel::Listener implementation ------------------------------------- 373 // IPC::Channel::Listener implementation -------------------------------------
384 374
385 virtual bool OnMessageReceived(const IPC::Message& msg); 375 virtual bool OnMessageReceived(const IPC::Message& msg);
386 376
387 // WebKit::WebWidgetClient implementation ------------------------------------ 377 // WebKit::WebWidgetClient implementation ------------------------------------
388 378
389 // Most methods are handled by RenderWidget. 379 // Most methods are handled by RenderWidget.
390 virtual void didFocus(); 380 virtual void didFocus();
391 virtual void didBlur(); 381 virtual void didBlur();
392 virtual void show(WebKit::WebNavigationPolicy policy); 382 virtual void show(WebKit::WebNavigationPolicy policy);
393 virtual void closeWidgetSoon();
394 virtual void runModal(); 383 virtual void runModal();
395 384
396 // WebKit::WebViewClient implementation -------------------------------------- 385 // WebKit::WebViewClient implementation --------------------------------------
397 386
398 virtual WebKit::WebView* createView( 387 virtual WebKit::WebView* createView(
399 WebKit::WebFrame* creator, 388 WebKit::WebFrame* creator,
400 const WebKit::WebURLRequest& request, 389 const WebKit::WebURLRequest& request,
401 const WebKit::WebWindowFeatures& features, 390 const WebKit::WebWindowFeatures& features,
402 const WebKit::WebString& frame_name); 391 const WebKit::WebString& frame_name);
403 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); 392 virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type);
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 // sent to the browser. 1370 // sent to the browser.
1382 std::vector<RendererAccessibilityNotification> 1371 std::vector<RendererAccessibilityNotification>
1383 pending_accessibility_notifications_; 1372 pending_accessibility_notifications_;
1384 1373
1385 // Set if we are waiting for a accessibility notification ack. 1374 // Set if we are waiting for a accessibility notification ack.
1386 bool accessibility_ack_pending_; 1375 bool accessibility_ack_pending_;
1387 1376
1388 // Responsible for sending page load related histograms. 1377 // Responsible for sending page load related histograms.
1389 PageLoadHistograms page_load_histograms_; 1378 PageLoadHistograms page_load_histograms_;
1390 1379
1391 // Handles the interaction between the RenderView and the phishing
1392 // classifier.
1393 scoped_ptr<safe_browsing::PhishingClassifierDelegate> phishing_delegate_;
1394
1395 // Misc ---------------------------------------------------------------------- 1380 // Misc ----------------------------------------------------------------------
1396 1381
1397 // The current and pending file chooser completion objects. If the queue is 1382 // The current and pending file chooser completion objects. If the queue is
1398 // nonempty, the first item represents the currently running file chooser 1383 // nonempty, the first item represents the currently running file chooser
1399 // callback, and the remaining elements are the other file chooser completion 1384 // callback, and the remaining elements are the other file chooser completion
1400 // still waiting to be run (in order). 1385 // still waiting to be run (in order).
1401 struct PendingFileChooser; 1386 struct PendingFileChooser;
1402 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; 1387 std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_;
1403 1388
1404 std::queue<linked_ptr<ViewMsg_ExecuteCode_Params> > 1389 std::queue<linked_ptr<ViewMsg_ExecuteCode_Params> >
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 // bunch of stuff, you should probably create a helper class and put your 1461 // bunch of stuff, you should probably create a helper class and put your
1477 // data and methods on that to avoid bloating RenderView more. You can use 1462 // data and methods on that to avoid bloating RenderView more. You can use
1478 // the Observer interface to filter IPC messages and receive frame change 1463 // the Observer interface to filter IPC messages and receive frame change
1479 // notifications. 1464 // notifications.
1480 // --------------------------------------------------------------------------- 1465 // ---------------------------------------------------------------------------
1481 1466
1482 DISALLOW_COPY_AND_ASSIGN(RenderView); 1467 DISALLOW_COPY_AND_ASSIGN(RenderView);
1483 }; 1468 };
1484 1469
1485 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1470 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698