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

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 2060933002: Let Flash join and be controlled by media session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pepper_to_contents
Patch Set: addressed Mounir's comments Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class BrowserPluginGuest; 56 class BrowserPluginGuest;
57 class DateTimeChooserAndroid; 57 class DateTimeChooserAndroid;
58 class DownloadItem; 58 class DownloadItem;
59 class FindRequestManager; 59 class FindRequestManager;
60 class GeolocationServiceContext; 60 class GeolocationServiceContext;
61 class InterstitialPageImpl; 61 class InterstitialPageImpl;
62 class JavaScriptDialogManager; 62 class JavaScriptDialogManager;
63 class LoaderIOThreadNotifier; 63 class LoaderIOThreadNotifier;
64 class ManifestManagerHost; 64 class ManifestManagerHost;
65 class MediaWebContentsObserver; 65 class MediaWebContentsObserver;
66 class PepperWebContentsObserver;
66 class PluginContentOriginWhitelist; 67 class PluginContentOriginWhitelist;
67 class PowerSaveBlocker; 68 class PowerSaveBlocker;
68 class RenderViewHost; 69 class RenderViewHost;
69 class RenderViewHostDelegateView; 70 class RenderViewHostDelegateView;
70 class RenderWidgetHostImpl; 71 class RenderWidgetHostImpl;
71 class RenderWidgetHostInputEventRouter; 72 class RenderWidgetHostInputEventRouter;
72 class SavePackage; 73 class SavePackage;
73 class ScreenOrientationDispatcherHost; 74 class ScreenOrientationDispatcherHost;
74 class SiteInstance; 75 class SiteInstance;
75 class TestWebContents; 76 class TestWebContents;
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 736
736 // Called by MediaWebContentsObserver when playback starts or stops. See the 737 // Called by MediaWebContentsObserver when playback starts or stops. See the
737 // WebContentsObserver function stubs for more details. 738 // WebContentsObserver function stubs for more details.
738 void MediaStartedPlaying(const WebContentsObserver::MediaPlayerId& id); 739 void MediaStartedPlaying(const WebContentsObserver::MediaPlayerId& id);
739 void MediaStoppedPlaying(const WebContentsObserver::MediaPlayerId& id); 740 void MediaStoppedPlaying(const WebContentsObserver::MediaPlayerId& id);
740 741
741 MediaWebContentsObserver* media_web_contents_observer() { 742 MediaWebContentsObserver* media_web_contents_observer() {
742 return media_web_contents_observer_.get(); 743 return media_web_contents_observer_.get();
743 } 744 }
744 745
746 #if defined(ENABLE_PLUGINS)
747 PepperWebContentsObserver* pepper_web_contents_observer() {
748 return pepper_web_contents_observer_.get();
749 }
750 #endif // defined(ENABLE_PLUGINS)
751
745 // Update the web contents visibility. 752 // Update the web contents visibility.
746 void UpdateWebContentsVisibility(bool visible); 753 void UpdateWebContentsVisibility(bool visible);
747 754
748 // Called by FindRequestManager when find replies come in from a renderer 755 // Called by FindRequestManager when find replies come in from a renderer
749 // process. 756 // process.
750 void NotifyFindReply(int request_id, 757 void NotifyFindReply(int request_id,
751 int number_of_matches, 758 int number_of_matches,
752 const gfx::Rect& selection_rect, 759 const gfx::Rect& selection_rect,
753 int active_match_ordinal, 760 int active_match_ordinal,
754 bool final_update); 761 bool final_update);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 void OnOpenColorChooser(int color_chooser_id, 944 void OnOpenColorChooser(int color_chooser_id,
938 SkColor color, 945 SkColor color,
939 const std::vector<ColorSuggestion>& suggestions); 946 const std::vector<ColorSuggestion>& suggestions);
940 void OnEndColorChooser(int color_chooser_id); 947 void OnEndColorChooser(int color_chooser_id);
941 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); 948 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color);
942 void OnWebUISend(const GURL& source_url, 949 void OnWebUISend(const GURL& source_url,
943 const std::string& name, 950 const std::string& name,
944 const base::ListValue& args); 951 const base::ListValue& args);
945 void OnUpdatePageImportanceSignals(const PageImportanceSignals& signals); 952 void OnUpdatePageImportanceSignals(const PageImportanceSignals& signals);
946 #if defined(ENABLE_PLUGINS) 953 #if defined(ENABLE_PLUGINS)
947 void OnPepperInstanceCreated(); 954 void OnPepperInstanceCreated(int32_t pp_instance);
948 void OnPepperInstanceDeleted(); 955 void OnPepperInstanceDeleted(int32_t pp_instance);
949 void OnPepperPluginHung(int plugin_child_id, 956 void OnPepperPluginHung(int plugin_child_id,
950 const base::FilePath& path, 957 const base::FilePath& path,
951 bool is_hung); 958 bool is_hung);
952 void OnPluginCrashed(const base::FilePath& plugin_path, 959 void OnPluginCrashed(const base::FilePath& plugin_path,
953 base::ProcessId plugin_pid); 960 base::ProcessId plugin_pid);
954 void OnRequestPpapiBrokerPermission(int routing_id, 961 void OnRequestPpapiBrokerPermission(int routing_id,
955 const GURL& url, 962 const GURL& url,
956 const base::FilePath& plugin_path); 963 const base::FilePath& plugin_path);
957 964
958 // Callback function when requesting permission to access the PPAPI broker. 965 // Callback function when requesting permission to access the PPAPI broker.
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 size_t bluetooth_connected_device_count_; 1383 size_t bluetooth_connected_device_count_;
1377 1384
1378 bool virtual_keyboard_requested_; 1385 bool virtual_keyboard_requested_;
1379 1386
1380 // Notifies ResourceDispatcherHostImpl of various events related to loading. 1387 // Notifies ResourceDispatcherHostImpl of various events related to loading.
1381 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; 1388 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_;
1382 1389
1383 // Manages media players, CDMs, and power save blockers for media. 1390 // Manages media players, CDMs, and power save blockers for media.
1384 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; 1391 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_;
1385 1392
1393 #if defined(ENABLE_PLUGINS)
1394 // Observer for pepper creation, deletion and playback.
1395 std::unique_ptr<PepperWebContentsObserver> pepper_web_contents_observer_;
jochen (gone - plz use gerrit) 2016/06/27 11:47:11 have you considered inlining this class in web con
Zhiqiang Zhang (Slow) 2016/06/28 18:53:24 I made PepperWebContentsObserver not inheriting fr
1396 #endif // defined(ENABLE_PLUGINS)
1397
1386 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; 1398 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_;
1387 1399
1388 PageImportanceSignals page_importance_signals_; 1400 PageImportanceSignals page_importance_signals_;
1389 1401
1390 bool page_scale_factor_is_one_; 1402 bool page_scale_factor_is_one_;
1391 1403
1392 // TextInputManager tracks the IME-related state for all the 1404 // TextInputManager tracks the IME-related state for all the
1393 // RenderWidgetHostViews on this WebContents. Only exists on the outermost 1405 // RenderWidgetHostViews on this WebContents. Only exists on the outermost
1394 // WebContents and is automatically destroyed when a WebContents becomes an 1406 // WebContents and is automatically destroyed when a WebContents becomes an
1395 // inner WebContents by attaching to an outer WebContents. Then the 1407 // inner WebContents by attaching to an outer WebContents. Then the
(...skipping 24 matching lines...) Expand all
1420 // Adds/removes a callback called on creation of each new WebContents. 1432 // Adds/removes a callback called on creation of each new WebContents.
1421 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1433 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1422 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1434 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1423 1435
1424 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1436 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1425 }; 1437 };
1426 1438
1427 } // namespace content 1439 } // namespace content
1428 1440
1429 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1441 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698