Validate in-process plugin instance messages.

Bug: 733548, 733549
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ie5572c7bcafa05399b09c44425ddd5ce9b9e4cba
Reviewed-on: https://chromium-review.googlesource.com/538908
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480696}
void BrowserPpapiHostImpl::OnThrottleStateChanged(PP_Instance instance,
                                                  bool is_throttled) {
  auto it = instance_map_.find(instance);
  if (it != instance_map_.end()) {
    it->second->is_throttled = is_throttled;
    for (auto& observer : it->second->observer_list)
      observer.OnThrottleStateChanged(is_throttled);
  }
}

void BrowserPpapiHostImpl::OnThrottleStateChanged(PP_Instance instance,
                                                  bool is_throttled) {
  auto it = instance_map_.find(instance);
  if (it != instance_map_.end()) {
    it->second->is_throttled = is_throttled;
    for (auto& observer : it->second->observer_list)
      observer.OnThrottleStateChanged(is_throttled);
  }
}
