| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #include "extensions/browser/guest_view/guest_view_event.h" | |
| 6 | |
| 7 #include "extensions/browser/guest_view/guest_view_base.h" | |
| 8 #include "extensions/browser/guest_view/guest_view_manager.h" | |
| 9 | |
| 10 namespace extensions { | |
| 11 | |
| 12 GuestViewEvent::GuestViewEvent(const std::string& name, | |
| 13 scoped_ptr<base::DictionaryValue> args) | |
| 14 : name_(name), | |
| 15 args_(args.Pass()) { | |
| 16 } | |
| 17 | |
| 18 GuestViewEvent::~GuestViewEvent() { | |
| 19 } | |
| 20 | |
| 21 void GuestViewEvent::Dispatch(GuestViewBase* guest, int instance_id) { | |
| 22 GuestViewManager::FromBrowserContext(guest->browser_context())-> | |
| 23 DispatchEvent(name_, args_.Pass(), guest, instance_id); | |
| 24 | |
| 25 delete this; | |
| 26 } | |
| 27 | |
| 28 } // namespace extensions | |
| OLD | NEW |