Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_popup_api.h" | 5 #include "chrome/browser/extensions/extension_popup_api.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/browser_window.h" | |
|
Lei Zhang
2010/11/16 20:01:28
might as well replace this with ui/browser_window.
James Hawkins
2010/11/16 20:43:29
Done.
| |
| 11 #include "chrome/browser/extensions/extension_dom_ui.h" | 12 #include "chrome/browser/extensions/extension_dom_ui.h" |
| 12 #include "chrome/browser/extensions/extension_event_router.h" | 13 #include "chrome/browser/extensions/extension_event_router.h" |
| 13 #include "chrome/browser/extensions/extension_host.h" | 14 #include "chrome/browser/extensions/extension_host.h" |
| 14 #include "chrome/browser/browser.h" | |
| 15 #include "chrome/browser/browser_window.h" | |
| 16 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
| 17 #include "chrome/browser/renderer_host/render_view_host.h" | 16 #include "chrome/browser/renderer_host/render_view_host.h" |
| 18 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 17 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
| 19 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 18 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 20 #include "chrome/browser/tab_contents/tab_contents.h" | 19 #include "chrome/browser/tab_contents/tab_contents.h" |
| 20 #include "chrome/browser/ui/browser.h" | |
| 21 #include "chrome/browser/window_sizer.h" | 21 #include "chrome/browser/window_sizer.h" |
| 22 #include "chrome/common/extensions/extension.h" | 22 #include "chrome/common/extensions/extension.h" |
| 23 #include "chrome/common/notification_details.h" | 23 #include "chrome/common/notification_details.h" |
| 24 #include "chrome/common/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
| 25 #include "chrome/common/notification_source.h" | 25 #include "chrome/common/notification_source.h" |
| 26 #include "chrome/common/notification_type.h" | 26 #include "chrome/common/notification_type.h" |
| 27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 28 #include "gfx/point.h" | 28 #include "gfx/point.h" |
| 29 | 29 |
| 30 #if defined(TOOLKIT_VIEWS) | 30 #if defined(TOOLKIT_VIEWS) |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 // static | 504 // static |
| 505 void PopupEventRouter::OnPopupClosed(Profile* profile, | 505 void PopupEventRouter::OnPopupClosed(Profile* profile, |
| 506 int routing_id) { | 506 int routing_id) { |
| 507 std::string full_event_name = base::StringPrintf( | 507 std::string full_event_name = base::StringPrintf( |
| 508 extension_popup_module_events::kOnPopupClosed, | 508 extension_popup_module_events::kOnPopupClosed, |
| 509 routing_id); | 509 routing_id); |
| 510 | 510 |
| 511 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 511 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 512 full_event_name, base::JSONWriter::kEmptyArray, profile, GURL()); | 512 full_event_name, base::JSONWriter::kEmptyArray, profile, GURL()); |
| 513 } | 513 } |
| OLD | NEW |