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

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

Issue 2551093002: Route Pepper MediaSession messages to frames (Closed)
Patch Set: addressed Anton's comments Created 4 years 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 | « content/browser/media/session/pepper_player_delegate.cc ('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 // 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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3742 matching lines...) Expand 10 before | Expand all | Expand 10 after
3753 const std::string& name, 3753 const std::string& name,
3754 const base::ListValue& args) { 3754 const base::ListValue& args) {
3755 if (delegate_) 3755 if (delegate_)
3756 delegate_->WebUISend(this, source_url, name, args); 3756 delegate_->WebUISend(this, source_url, name, args);
3757 } 3757 }
3758 3758
3759 #if BUILDFLAG(ENABLE_PLUGINS) 3759 #if BUILDFLAG(ENABLE_PLUGINS)
3760 void WebContentsImpl::OnPepperInstanceCreated(int32_t pp_instance) { 3760 void WebContentsImpl::OnPepperInstanceCreated(int32_t pp_instance) {
3761 for (auto& observer : observers_) 3761 for (auto& observer : observers_)
3762 observer.PepperInstanceCreated(); 3762 observer.PepperInstanceCreated();
3763 pepper_playback_observer_->PepperInstanceCreated(pp_instance); 3763 pepper_playback_observer_->PepperInstanceCreated(
3764 render_frame_message_source_, pp_instance);
piman 2016/12/06 21:26:12 I am somewhat concerned that render_frame_message_
Zhiqiang Zhang (Slow) 2016/12/07 16:36:20 Thanks for pointing out. Done.
3764 } 3765 }
3765 3766
3766 void WebContentsImpl::OnPepperInstanceDeleted(int32_t pp_instance) { 3767 void WebContentsImpl::OnPepperInstanceDeleted(int32_t pp_instance) {
3767 for (auto& observer : observers_) 3768 for (auto& observer : observers_)
3768 observer.PepperInstanceDeleted(); 3769 observer.PepperInstanceDeleted();
3769 pepper_playback_observer_->PepperInstanceDeleted(pp_instance); 3770 pepper_playback_observer_->PepperInstanceDeleted(
3771 render_frame_message_source_, pp_instance);
3770 } 3772 }
3771 3773
3772 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id, 3774 void WebContentsImpl::OnPepperPluginHung(int plugin_child_id,
3773 const base::FilePath& path, 3775 const base::FilePath& path,
3774 bool is_hung) { 3776 bool is_hung) {
3775 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1); 3777 UMA_HISTOGRAM_COUNTS("Pepper.PluginHung", 1);
3776 3778
3777 for (auto& observer : observers_) 3779 for (auto& observer : observers_)
3778 observer.PluginHungStatusChanged(plugin_child_id, path, is_hung); 3780 observer.PluginHungStatusChanged(plugin_child_id, path, is_hung);
3779 } 3781 }
3780 3782
3781 void WebContentsImpl::OnPepperStartsPlayback(int32_t pp_instance) { 3783 void WebContentsImpl::OnPepperStartsPlayback(int32_t pp_instance) {
3782 pepper_playback_observer_->PepperStartsPlayback(pp_instance); 3784 pepper_playback_observer_->PepperStartsPlayback(
3785 render_frame_message_source_, pp_instance);
3783 } 3786 }
3784 3787
3785 void WebContentsImpl::OnPepperStopsPlayback(int32_t pp_instance) { 3788 void WebContentsImpl::OnPepperStopsPlayback(int32_t pp_instance) {
3786 pepper_playback_observer_->PepperStopsPlayback(pp_instance); 3789 pepper_playback_observer_->PepperStopsPlayback(
3790 render_frame_message_source_, pp_instance);
3787 } 3791 }
3788 3792
3789 void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path, 3793 void WebContentsImpl::OnPluginCrashed(const base::FilePath& plugin_path,
3790 base::ProcessId plugin_pid) { 3794 base::ProcessId plugin_pid) {
3791 for (auto& observer : observers_) 3795 for (auto& observer : observers_)
3792 observer.PluginCrashed(plugin_path, plugin_pid); 3796 observer.PluginCrashed(plugin_path, plugin_pid);
3793 } 3797 }
3794 3798
3795 void WebContentsImpl::OnRequestPpapiBrokerPermission( 3799 void WebContentsImpl::OnRequestPpapiBrokerPermission(
3796 int routing_id, 3800 int routing_id,
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 dialog_manager_ = dialog_manager; 5284 dialog_manager_ = dialog_manager;
5281 } 5285 }
5282 5286
5283 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5287 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5284 auto it = binding_sets_.find(interface_name); 5288 auto it = binding_sets_.find(interface_name);
5285 if (it != binding_sets_.end()) 5289 if (it != binding_sets_.end())
5286 binding_sets_.erase(it); 5290 binding_sets_.erase(it);
5287 } 5291 }
5288 5292
5289 } // namespace content 5293 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/session/pepper_player_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698