OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 const gfx::RectF& active_rect); | 766 const gfx::RectF& active_rect); |
767 | 767 |
768 void OnOpenDateTimeDialog( | 768 void OnOpenDateTimeDialog( |
769 const ViewHostMsg_DateTimeDialogValue_Params& value); | 769 const ViewHostMsg_DateTimeDialogValue_Params& value); |
770 #endif | 770 #endif |
771 void OnPepperPluginHung(int plugin_child_id, | 771 void OnPepperPluginHung(int plugin_child_id, |
772 const base::FilePath& path, | 772 const base::FilePath& path, |
773 bool is_hung); | 773 bool is_hung); |
774 void OnPluginCrashed(const base::FilePath& plugin_path, | 774 void OnPluginCrashed(const base::FilePath& plugin_path, |
775 base::ProcessId plugin_pid); | 775 base::ProcessId plugin_pid); |
| 776 void OnPluginContentOriginAllowed(const GURL& content_origin); |
776 void OnDomOperationResponse(const std::string& json_string, | 777 void OnDomOperationResponse(const std::string& json_string, |
777 int automation_id); | 778 int automation_id); |
778 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 779 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
779 void OnOpenColorChooser(int color_chooser_id, | 780 void OnOpenColorChooser(int color_chooser_id, |
780 SkColor color, | 781 SkColor color, |
781 const std::vector<ColorSuggestion>& suggestions); | 782 const std::vector<ColorSuggestion>& suggestions); |
782 void OnEndColorChooser(int color_chooser_id); | 783 void OnEndColorChooser(int color_chooser_id); |
783 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); | 784 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); |
784 void OnWebUISend(const GURL& source_url, | 785 void OnWebUISend(const GURL& source_url, |
785 const std::string& name, | 786 const std::string& name, |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 typedef std::vector<int64> PlayerList; | 924 typedef std::vector<int64> PlayerList; |
924 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; | 925 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; |
925 void AddMediaPlayerEntry(int64 player_cookie, | 926 void AddMediaPlayerEntry(int64 player_cookie, |
926 ActiveMediaPlayerMap* player_map); | 927 ActiveMediaPlayerMap* player_map); |
927 void RemoveMediaPlayerEntry(int64 player_cookie, | 928 void RemoveMediaPlayerEntry(int64 player_cookie, |
928 ActiveMediaPlayerMap* player_map); | 929 ActiveMediaPlayerMap* player_map); |
929 // Removes all entries from |player_map| for |render_frame_host|. | 930 // Removes all entries from |player_map| for |render_frame_host|. |
930 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, | 931 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, |
931 ActiveMediaPlayerMap* player_map); | 932 ActiveMediaPlayerMap* player_map); |
932 | 933 |
| 934 // Gets the tab-wide plugin content origin whitelist. |
| 935 std::set<GURL> GetPluginContentOriginWhitelist(); |
| 936 |
933 // Adds/removes a callback called on creation of each new WebContents. | 937 // Adds/removes a callback called on creation of each new WebContents. |
934 // Deprecated, about to remove. | 938 // Deprecated, about to remove. |
935 static void AddCreatedCallback(const CreatedCallback& callback); | 939 static void AddCreatedCallback(const CreatedCallback& callback); |
936 static void RemoveCreatedCallback(const CreatedCallback& callback); | 940 static void RemoveCreatedCallback(const CreatedCallback& callback); |
937 | 941 |
938 // Data for core operation --------------------------------------------------- | 942 // Data for core operation --------------------------------------------------- |
939 | 943 |
940 // Delegate for notifying our owner about stuff. Not owned by us. | 944 // Delegate for notifying our owner about stuff. Not owned by us. |
941 WebContentsDelegate* delegate_; | 945 WebContentsDelegate* delegate_; |
942 | 946 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 #endif | 987 #endif |
984 | 988 |
985 // Helper classes ------------------------------------------------------------ | 989 // Helper classes ------------------------------------------------------------ |
986 | 990 |
987 // Tracking variables and associated power save blockers for media playback. | 991 // Tracking variables and associated power save blockers for media playback. |
988 ActiveMediaPlayerMap active_audio_players_; | 992 ActiveMediaPlayerMap active_audio_players_; |
989 ActiveMediaPlayerMap active_video_players_; | 993 ActiveMediaPlayerMap active_video_players_; |
990 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_; | 994 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_; |
991 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_; | 995 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_; |
992 | 996 |
| 997 #if defined(ENABLE_PLUGINS) |
| 998 // Plugin content origins that have been whitelisted. |
| 999 typedef std::map<RenderFrameHost*, std::set<GURL>> PluginContentOriginMap; |
| 1000 PluginContentOriginMap plugin_content_origin_whitelist_; |
| 1001 #endif |
| 1002 |
993 // Manages the frame tree of the page and process swaps in each node. | 1003 // Manages the frame tree of the page and process swaps in each node. |
994 FrameTree frame_tree_; | 1004 FrameTree frame_tree_; |
995 | 1005 |
996 // SavePackage, lazily created. | 1006 // SavePackage, lazily created. |
997 scoped_refptr<SavePackage> save_package_; | 1007 scoped_refptr<SavePackage> save_package_; |
998 | 1008 |
999 // Data for loading state ---------------------------------------------------- | 1009 // Data for loading state ---------------------------------------------------- |
1000 | 1010 |
1001 // Indicates whether we're currently loading a resource. | 1011 // Indicates whether we're currently loading a resource. |
1002 bool is_loading_; | 1012 bool is_loading_; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 scoped_ptr<WebContentsAudioMuter> audio_muter_; | 1223 scoped_ptr<WebContentsAudioMuter> audio_muter_; |
1214 | 1224 |
1215 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1225 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1216 | 1226 |
1217 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1227 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1218 }; | 1228 }; |
1219 | 1229 |
1220 } // namespace content | 1230 } // namespace content |
1221 | 1231 |
1222 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1232 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |