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

Side by Side Diff: third_party/WebKit/public/web/WebFrameClient.h

Issue 2855123003: Remove rendundant WebLocalFrame parameter in various plugin code. (Closed)
Patch Set: Fix Android Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 struct WebRect; 110 struct WebRect;
111 struct WebURLError; 111 struct WebURLError;
112 112
113 class BLINK_EXPORT WebFrameClient { 113 class BLINK_EXPORT WebFrameClient {
114 public: 114 public:
115 virtual ~WebFrameClient() {} 115 virtual ~WebFrameClient() {}
116 116
117 // Factory methods ----------------------------------------------------- 117 // Factory methods -----------------------------------------------------
118 118
119 // May return null. 119 // May return null.
120 virtual WebPlugin* CreatePlugin(WebLocalFrame*, const WebPluginParams&) { 120 virtual WebPlugin* CreatePlugin(const WebPluginParams&) { return nullptr; }
121 return 0;
122 }
123 121
124 // May return null. 122 // May return null.
125 // WebContentDecryptionModule* may be null if one has not yet been set. 123 // WebContentDecryptionModule* may be null if one has not yet been set.
126 virtual WebMediaPlayer* CreateMediaPlayer(const WebMediaPlayerSource&, 124 virtual WebMediaPlayer* CreateMediaPlayer(const WebMediaPlayerSource&,
127 WebMediaPlayerClient*, 125 WebMediaPlayerClient*,
128 WebMediaPlayerEncryptedMediaClient*, 126 WebMediaPlayerEncryptedMediaClient*,
129 WebContentDecryptionModule*, 127 WebContentDecryptionModule*,
130 const WebString& sink_id) { 128 const WebString& sink_id) {
131 return 0; 129 return nullptr;
jochen (gone - plz use gerrit) 2017/05/05 14:32:40 nit. adding many but unrelated style fixes like th
Lei Zhang 2017/05/05 17:18:29 I'll try to make a separate cleanup pass next time
132 } 130 }
133 131
134 // May return null. 132 // May return null.
135 virtual WebMediaSession* CreateMediaSession() { return 0; } 133 virtual WebMediaSession* CreateMediaSession() { return nullptr; }
136 134
137 // May return null. 135 // May return null.
138 virtual std::unique_ptr<WebApplicationCacheHost> CreateApplicationCacheHost( 136 virtual std::unique_ptr<WebApplicationCacheHost> CreateApplicationCacheHost(
139 WebApplicationCacheHostClient*) { 137 WebApplicationCacheHostClient*) {
140 return nullptr; 138 return nullptr;
141 } 139 }
142 140
143 // May return null. 141 // May return null.
144 virtual std::unique_ptr<WebServiceWorkerProvider> 142 virtual std::unique_ptr<WebServiceWorkerProvider>
145 CreateServiceWorkerProvider() { 143 CreateServiceWorkerProvider() {
146 return nullptr; 144 return nullptr;
147 } 145 }
148 146
149 // May return null. 147 // May return null.
150 virtual WebWorkerContentSettingsClientProxy* 148 virtual WebWorkerContentSettingsClientProxy*
151 CreateWorkerContentSettingsClientProxy() { 149 CreateWorkerContentSettingsClientProxy() {
152 return 0; 150 return nullptr;
153 } 151 }
154 152
155 // Returns a new WebWorkerFetchContext for a dedicated worker. Ownership of 153 // Returns a new WebWorkerFetchContext for a dedicated worker. Ownership of
156 // the returned object is transferred to the caller. This is used only when 154 // the returned object is transferred to the caller. This is used only when
157 // off-main-thread-fetch is enabled. 155 // off-main-thread-fetch is enabled.
158 virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext() { 156 virtual std::unique_ptr<WebWorkerFetchContext> CreateWorkerFetchContext() {
159 return nullptr; 157 return nullptr;
160 } 158 }
161 159
162 // Create a new WebPopupMenu. In the "createExternalPopupMenu" form, the 160 // Create a new WebPopupMenu. In the "createExternalPopupMenu" form, the
163 // client is responsible for rendering the contents of the popup menu. 161 // client is responsible for rendering the contents of the popup menu.
164 virtual WebExternalPopupMenu* CreateExternalPopupMenu( 162 virtual WebExternalPopupMenu* CreateExternalPopupMenu(
165 const WebPopupMenuInfo&, 163 const WebPopupMenuInfo&,
166 WebExternalPopupMenuClient*) { 164 WebExternalPopupMenuClient*) {
167 return 0; 165 return nullptr;
168 } 166 }
169 167
170 // Services ------------------------------------------------------------ 168 // Services ------------------------------------------------------------
171 169
172 // A frame specific cookie jar. May return null, in which case 170 // A frame specific cookie jar. May return null, in which case
173 // WebKitPlatformSupport::cookieJar() will be called to access cookies. 171 // WebKitPlatformSupport::cookieJar() will be called to access cookies.
174 virtual WebCookieJar* CookieJar() { return 0; } 172 virtual WebCookieJar* CookieJar() { return nullptr; }
175 173
176 // Returns a blame context for attributing work belonging to this frame. 174 // Returns a blame context for attributing work belonging to this frame.
177 virtual BlameContext* GetFrameBlameContext() { return nullptr; } 175 virtual BlameContext* GetFrameBlameContext() { return nullptr; }
178 176
179 // General notifications ----------------------------------------------- 177 // General notifications -----------------------------------------------
180 178
181 // Indicates if creating a plugin without an associated renderer is supported. 179 // Indicates if creating a plugin without an associated renderer is supported.
182 virtual bool CanCreatePluginWithoutRenderer(const WebString& mime_type) { 180 virtual bool CanCreatePluginWithoutRenderer(const WebString& mime_type) {
183 return false; 181 return false;
184 } 182 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 WebNavigationPolicy default_policy; 313 WebNavigationPolicy default_policy;
316 bool replaces_current_history_item; 314 bool replaces_current_history_item;
317 bool is_history_navigation_in_new_child_frame; 315 bool is_history_navigation_in_new_child_frame;
318 bool is_client_redirect; 316 bool is_client_redirect;
319 WebFormElement form; 317 WebFormElement form;
320 bool is_cache_disabled; 318 bool is_cache_disabled;
321 WebSourceLocation source_location; 319 WebSourceLocation source_location;
322 WebContentSecurityPolicyDisposition 320 WebContentSecurityPolicyDisposition
323 should_check_main_world_content_security_policy; 321 should_check_main_world_content_security_policy;
324 322
325 NavigationPolicyInfo(WebURLRequest& url_request) 323 explicit NavigationPolicyInfo(WebURLRequest& url_request)
326 : extra_data(nullptr), 324 : extra_data(nullptr),
327 url_request(url_request), 325 url_request(url_request),
328 navigation_type(kWebNavigationTypeOther), 326 navigation_type(kWebNavigationTypeOther),
329 default_policy(kWebNavigationPolicyIgnore), 327 default_policy(kWebNavigationPolicyIgnore),
330 replaces_current_history_item(false), 328 replaces_current_history_item(false),
331 is_history_navigation_in_new_child_frame(false), 329 is_history_navigation_in_new_child_frame(false),
332 is_client_redirect(false), 330 is_client_redirect(false),
333 is_cache_disabled(false), 331 is_cache_disabled(false),
334 should_check_main_world_content_security_policy( 332 should_check_main_world_content_security_policy(
335 kWebContentSecurityPolicyDispositionCheck) {} 333 kWebContentSecurityPolicyDispositionCheck) {}
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 return false; 471 return false;
474 } 472 }
475 473
476 // PlzNavigate 474 // PlzNavigate
477 // Called to abort a navigation that is being handled by the browser process. 475 // Called to abort a navigation that is being handled by the browser process.
478 virtual void AbortClientNavigation() {} 476 virtual void AbortClientNavigation() {}
479 477
480 // Push API --------------------------------------------------- 478 // Push API ---------------------------------------------------
481 479
482 // Used to access the embedder for the Push API. 480 // Used to access the embedder for the Push API.
483 virtual WebPushClient* PushClient() { return 0; } 481 virtual WebPushClient* PushClient() { return nullptr; }
484 482
485 // Presentation API ---------------------------------------------------- 483 // Presentation API ----------------------------------------------------
486 484
487 // Used to access the embedder for the Presentation API. 485 // Used to access the embedder for the Presentation API.
488 virtual WebPresentationClient* PresentationClient() { return 0; } 486 virtual WebPresentationClient* PresentationClient() { return nullptr; }
489 487
490 // InstalledApp API ---------------------------------------------------- 488 // InstalledApp API ----------------------------------------------------
491 489
492 // Used to access the embedder for the InstalledApp API. 490 // Used to access the embedder for the InstalledApp API.
493 virtual WebRelatedAppsFetcher* GetRelatedAppsFetcher() { return nullptr; } 491 virtual WebRelatedAppsFetcher* GetRelatedAppsFetcher() { return nullptr; }
494 492
495 // Editing ------------------------------------------------------------- 493 // Editing -------------------------------------------------------------
496 494
497 // These methods allow the client to intercept and overrule editing 495 // These methods allow the client to intercept and overrule editing
498 // operations. 496 // operations.
(...skipping 13 matching lines...) Expand all
512 // This method opens the color chooser and returns a new WebColorChooser 510 // This method opens the color chooser and returns a new WebColorChooser
513 // instance. If there is a WebColorChooser already from the last time this 511 // instance. If there is a WebColorChooser already from the last time this
514 // was called, it ends the color chooser by calling endChooser, and replaces 512 // was called, it ends the color chooser by calling endChooser, and replaces
515 // it with the new one. The given list of suggestions can be used to show a 513 // it with the new one. The given list of suggestions can be used to show a
516 // simple interface with a limited set of choices. 514 // simple interface with a limited set of choices.
517 515
518 virtual WebColorChooser* CreateColorChooser( 516 virtual WebColorChooser* CreateColorChooser(
519 WebColorChooserClient*, 517 WebColorChooserClient*,
520 const WebColor&, 518 const WebColor&,
521 const WebVector<WebColorSuggestion>&) { 519 const WebVector<WebColorSuggestion>&) {
522 return 0; 520 return nullptr;
523 } 521 }
524 522
525 // Displays a modal alert dialog containing the given message. Returns 523 // Displays a modal alert dialog containing the given message. Returns
526 // once the user dismisses the dialog. 524 // once the user dismisses the dialog.
527 virtual void RunModalAlertDialog(const WebString& message) {} 525 virtual void RunModalAlertDialog(const WebString& message) {}
528 526
529 // Displays a modal confirmation dialog with the given message as 527 // Displays a modal confirmation dialog with the given message as
530 // description and OK/Cancel choices. Returns true if the user selects 528 // description and OK/Cancel choices. Returns true if the user selects
531 // 'OK' or false otherwise. 529 // 'OK' or false otherwise.
532 virtual bool RunModalConfirmDialog(const WebString& message) { return false; } 530 virtual bool RunModalConfirmDialog(const WebString& message) { return false; }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 virtual void RequestStorageQuota(WebStorageQuotaType, 662 virtual void RequestStorageQuota(WebStorageQuotaType,
665 unsigned long long new_quota_in_bytes, 663 unsigned long long new_quota_in_bytes,
666 WebStorageQuotaCallbacks) {} 664 WebStorageQuotaCallbacks) {}
667 665
668 // MediaStream ----------------------------------------------------- 666 // MediaStream -----------------------------------------------------
669 667
670 // A new WebRTCPeerConnectionHandler is created. 668 // A new WebRTCPeerConnectionHandler is created.
671 virtual void WillStartUsingPeerConnectionHandler( 669 virtual void WillStartUsingPeerConnectionHandler(
672 WebRTCPeerConnectionHandler*) {} 670 WebRTCPeerConnectionHandler*) {}
673 671
674 virtual WebUserMediaClient* UserMediaClient() { return 0; } 672 virtual WebUserMediaClient* UserMediaClient() { return nullptr; }
675 673
676 // Encrypted Media ------------------------------------------------- 674 // Encrypted Media -------------------------------------------------
677 675
678 virtual WebEncryptedMediaClient* EncryptedMediaClient() { return 0; } 676 virtual WebEncryptedMediaClient* EncryptedMediaClient() { return nullptr; }
679 677
680 // User agent ------------------------------------------------------ 678 // User agent ------------------------------------------------------
681 679
682 // Asks the embedder if a specific user agent should be used. Non-empty 680 // Asks the embedder if a specific user agent should be used. Non-empty
683 // strings indicate an override should be used. Otherwise, 681 // strings indicate an override should be used. Otherwise,
684 // Platform::current()->userAgent() will be called to provide one. 682 // Platform::current()->userAgent() will be called to provide one.
685 virtual WebString UserAgentOverride() { return WebString(); } 683 virtual WebString UserAgentOverride() { return WebString(); }
686 684
687 // Do not track ---------------------------------------------------- 685 // Do not track ----------------------------------------------------
688 686
689 // Asks the embedder what value the network stack will send for the DNT 687 // Asks the embedder what value the network stack will send for the DNT
690 // header. An empty string indicates that no DNT header will be send. 688 // header. An empty string indicates that no DNT header will be send.
691 virtual WebString DoNotTrackValue() { return WebString(); } 689 virtual WebString DoNotTrackValue() { return WebString(); }
692 690
693 // WebGL ------------------------------------------------------ 691 // WebGL ------------------------------------------------------
694 692
695 // Asks the embedder whether WebGL is allowed for the WebFrame. This call is 693 // Asks the embedder whether WebGL is allowed for the WebFrame. This call is
696 // placed here instead of WebContentSettingsClient because this class is 694 // placed here instead of WebContentSettingsClient because this class is
697 // implemented in content/, and putting it here avoids adding more public 695 // implemented in content/, and putting it here avoids adding more public
698 // content/ APIs. 696 // content/ APIs.
699 virtual bool AllowWebGL(bool default_value) { return default_value; } 697 virtual bool AllowWebGL(bool default_value) { return default_value; }
700 698
701 // Screen Orientation -------------------------------------------------- 699 // Screen Orientation --------------------------------------------------
702 700
703 // Access the embedder API for (client-based) screen orientation client . 701 // Access the embedder API for (client-based) screen orientation client .
704 virtual WebScreenOrientationClient* GetWebScreenOrientationClient() { 702 virtual WebScreenOrientationClient* GetWebScreenOrientationClient() {
705 return 0; 703 return nullptr;
706 } 704 }
707 705
708 // Accessibility ------------------------------------------------------- 706 // Accessibility -------------------------------------------------------
709 707
710 // Notifies embedder about an accessibility event. 708 // Notifies embedder about an accessibility event.
711 virtual void PostAccessibilityEvent(const WebAXObject&, WebAXEvent) {} 709 virtual void PostAccessibilityEvent(const WebAXObject&, WebAXEvent) {}
712 710
713 // Provides accessibility information about a find in page result. 711 // Provides accessibility information about a find in page result.
714 virtual void HandleAccessibilityFindInPageResult( 712 virtual void HandleAccessibilityFindInPageResult(
715 int identifier, 713 int identifier,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 // Overwrites the given URL to use an HTML5 embed if possible. 782 // Overwrites the given URL to use an HTML5 embed if possible.
785 // An empty URL is returned if the URL is not overriden. 783 // An empty URL is returned if the URL is not overriden.
786 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) { 784 virtual WebURL OverrideFlashEmbedWithHTML(const WebURL& url) {
787 return WebURL(); 785 return WebURL();
788 } 786 }
789 }; 787 };
790 788
791 } // namespace blink 789 } // namespace blink
792 790
793 #endif 791 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698