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

Side by Side Diff: chrome/browser/renderer_host/render_view_host_delegate.h

Issue 6374009: Get rid of a few more interfaces from RenderViewHostDelegate that aren't need... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 // Called when geolocation permission was set in a frame on the current 312 // Called when geolocation permission was set in a frame on the current
313 // page. 313 // page.
314 virtual void OnGeolocationPermissionSet(const GURL& requesting_frame, 314 virtual void OnGeolocationPermissionSet(const GURL& requesting_frame,
315 bool allowed) = 0; 315 bool allowed) = 0;
316 316
317 protected: 317 protected:
318 virtual ~ContentSettings() {} 318 virtual ~ContentSettings() {}
319 }; 319 };
320 320
321 // Save ----------------------------------------------------------------------
322 // Interface for saving web pages.
323
324 class Save {
325 public:
326 // Notification that we get when we receive all savable links of
327 // sub-resources for the current page, their referrers and list of frames
328 // (include main frame and sub frames).
329 virtual void OnReceivedSavableResourceLinksForCurrentPage(
330 const std::vector<GURL>& resources_list,
331 const std::vector<GURL>& referrers_list,
332 const std::vector<GURL>& frames_list) = 0;
333
334 // Notification that we get when we receive serialized html content data of
335 // a specified web page from render process. The parameter frame_url
336 // specifies what frame the data belongs. The parameter data contains the
337 // available data for sending. The parameter status indicates the
338 // serialization status, See
339 // webkit_glue::DomSerializerDelegate::PageSavingSerializationStatus for
340 // the detail meaning of status.
341 virtual void OnReceivedSerializedHtmlData(const GURL& frame_url,
342 const std::string& data,
343 int32 status) = 0;
344
345 protected:
346 virtual ~Save() {}
347 };
348
349 // Printing ------------------------------------------------------------------
350
351 class Printing {
352 public:
353 // Notification that the render view has calculated the number of printed
354 // pages.
355 virtual void DidGetPrintedPagesCount(int cookie, int number_pages) = 0;
356
357 // Notification that the render view is done rendering one printed page.
358 // This call is synchronous, the renderer is waiting on us because of the
359 // EMF memory mapped data.
360 virtual void DidPrintPage(
361 const ViewHostMsg_DidPrintPage_Params& params) = 0;
362
363 protected:
364 virtual ~Printing() {}
365 };
366
367 // FavIcon -------------------------------------------------------------------
368 // Interface for the renderer to supply favicon information.
369
370 class FavIcon {
371 public:
372 // An image that was requested to be downloaded by DownloadImage has
373 // completed.
374 //
375 // TODO(brettw) this should be renamed DidDownloadFavIcon, and the RVH
376 // function, IPC message, and the RenderView function DownloadImage should
377 // all be named DownloadFavIcon.
378 virtual void DidDownloadFavIcon(RenderViewHost* render_view_host,
379 int id,
380 const GURL& image_url,
381 bool errored,
382 const SkBitmap& image) = 0;
383
384 // The URL for the FavIcon of a page has changed.
385 virtual void UpdateFavIconURL(RenderViewHost* render_view_host,
386 int32 page_id,
387 const GURL& icon_url) = 0;
388
389 protected:
390 virtual ~FavIcon() {}
391 };
392
393 // BookmarkDrag -------------------------------------------------------------- 321 // BookmarkDrag --------------------------------------------------------------
394 // Interface for forwarding bookmark drag and drop to extenstions. 322 // Interface for forwarding bookmark drag and drop to extenstions.
395 323
396 class BookmarkDrag { 324 class BookmarkDrag {
397 public: 325 public:
398 virtual void OnDragEnter(const BookmarkNodeData& data) = 0; 326 virtual void OnDragEnter(const BookmarkNodeData& data) = 0;
399 virtual void OnDragOver(const BookmarkNodeData& data) = 0; 327 virtual void OnDragOver(const BookmarkNodeData& data) = 0;
400 virtual void OnDragLeave(const BookmarkNodeData& data) = 0; 328 virtual void OnDragLeave(const BookmarkNodeData& data) = 0;
401 virtual void OnDrop(const BookmarkNodeData& data) = 0; 329 virtual void OnDrop(const BookmarkNodeData& data) = 0;
402 330
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 366
439 // Called when |handler| has completed, so the delegate may release any 367 // Called when |handler| has completed, so the delegate may release any
440 // state accumulated. 368 // state accumulated.
441 virtual void OnAddClientCertificateFinished( 369 virtual void OnAddClientCertificateFinished(
442 scoped_refptr<SSLAddCertHandler> handler) = 0; 370 scoped_refptr<SSLAddCertHandler> handler) = 0;
443 371
444 protected: 372 protected:
445 virtual ~SSL() {} 373 virtual ~SSL() {}
446 }; 374 };
447 375
448 // FileSelect ----------------------------------------------------------------
449 // Interface for handling file selection.
450
451 class FileSelect {
452 public:
453 // A file chooser should be shown.
454 virtual void RunFileChooser(
455 RenderViewHost* render_view_host,
456 const ViewHostMsg_RunFileChooser_Params& params) = 0;
457
458 protected:
459 virtual ~FileSelect() {}
460 };
461
462 // --------------------------------------------------------------------------- 376 // ---------------------------------------------------------------------------
463 377
464 // Returns the current delegate associated with a feature. May return NULL if 378 // Returns the current delegate associated with a feature. May return NULL if
465 // there is no corresponding delegate. 379 // there is no corresponding delegate.
466 virtual View* GetViewDelegate(); 380 virtual View* GetViewDelegate();
467 virtual RendererManagement* GetRendererManagementDelegate(); 381 virtual RendererManagement* GetRendererManagementDelegate();
468 virtual ContentSettings* GetContentSettingsDelegate(); 382 virtual ContentSettings* GetContentSettingsDelegate();
469 virtual Save* GetSaveDelegate();
470 virtual Printing* GetPrintingDelegate();
471 virtual FavIcon* GetFavIconDelegate();
472 383
473 virtual BookmarkDrag* GetBookmarkDragDelegate(); 384 virtual BookmarkDrag* GetBookmarkDragDelegate();
474 virtual SSL* GetSSLDelegate(); 385 virtual SSL* GetSSLDelegate();
475 virtual FileSelect* GetFileSelectDelegate();
476 386
477 // Return the delegate for registering RenderViewHosts for automation resource 387 // Return the delegate for registering RenderViewHosts for automation resource
478 // routing. 388 // routing.
479 virtual AutomationResourceRoutingDelegate* 389 virtual AutomationResourceRoutingDelegate*
480 GetAutomationResourceRoutingDelegate(); 390 GetAutomationResourceRoutingDelegate();
481 391
482 // IPC::Channel::Listener implementation. 392 // IPC::Channel::Listener implementation.
483 // This is used to give the delegate a chance to filter IPC messages. 393 // This is used to give the delegate a chance to filter IPC messages.
484 virtual bool OnMessageReceived(const IPC::Message& message); 394 virtual bool OnMessageReceived(const IPC::Message& message);
485 395
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 bool remember) {} 587 bool remember) {}
678 588
679 // Notification that a worker process has crashed. 589 // Notification that a worker process has crashed.
680 void WorkerCrashed() {} 590 void WorkerCrashed() {}
681 591
682 protected: 592 protected:
683 virtual ~RenderViewHostDelegate() {} 593 virtual ~RenderViewHostDelegate() {}
684 }; 594 };
685 595
686 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 596 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/renderer_host/render_view_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698