Roll ANGLE cc54ab3..c5b2ba5
[chromium-blink-merge.git] / components / guest_view / browser / guest_view_event.cc
bloba88d62f8da908a047e0427939d4e175b161ed5c3
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/guest_view/browser/guest_view_event.h"
7 #include "components/guest_view/browser/guest_view_base.h"
8 #include "components/guest_view/browser/guest_view_manager.h"
10 namespace guest_view {
12 GuestViewEvent::GuestViewEvent(const std::string& name,
13 scoped_ptr<base::DictionaryValue> args)
14 : name_(name),
15 args_(args.Pass()) {
18 GuestViewEvent::~GuestViewEvent() {
21 void GuestViewEvent::Dispatch(GuestViewBase* guest, int instance_id) {
22 GuestViewManager::FromBrowserContext(guest->browser_context())->
23 DispatchEvent(name_, args_.Pass(), guest, instance_id);
25 delete this;
28 } // namespace guest_view