| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/ui/window_sizer.h" | 22 #include "chrome/browser/ui/window_sizer.h" |
| 23 #include "chrome/common/extensions/extension.h" | 23 #include "chrome/common/extensions/extension.h" |
| 24 #include "chrome/common/notification_details.h" | 24 #include "chrome/common/notification_details.h" |
| 25 #include "chrome/common/notification_service.h" | 25 #include "chrome/common/notification_service.h" |
| 26 #include "chrome/common/notification_source.h" | 26 #include "chrome/common/notification_source.h" |
| 27 #include "chrome/common/notification_type.h" | 27 #include "chrome/common/notification_type.h" |
| 28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 29 #include "gfx/point.h" | 29 #include "gfx/point.h" |
| 30 | 30 |
| 31 #if defined(TOOLKIT_VIEWS) | 31 #if defined(TOOLKIT_VIEWS) |
| 32 #include "chrome/browser/views/bubble_border.h" | 32 #include "chrome/browser/ui/views/bubble_border.h" |
| 33 #include "chrome/browser/views/extensions/extension_popup.h" | 33 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| 34 #include "views/view.h" | 34 #include "views/view.h" |
| 35 #include "views/focus/focus_manager.h" | 35 #include "views/focus/focus_manager.h" |
| 36 #endif // TOOLKIT_VIEWS | 36 #endif // TOOLKIT_VIEWS |
| 37 | 37 |
| 38 namespace extension_popup_module_events { | 38 namespace extension_popup_module_events { |
| 39 | 39 |
| 40 const char kOnPopupClosed[] = "experimental.popup.onClosed.%d"; | 40 const char kOnPopupClosed[] = "experimental.popup.onClosed.%d"; |
| 41 | 41 |
| 42 } // namespace extension_popup_module_events | 42 } // namespace extension_popup_module_events |
| 43 | 43 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // static | 546 // static |
| 547 void PopupEventRouter::OnPopupClosed(Profile* profile, | 547 void PopupEventRouter::OnPopupClosed(Profile* profile, |
| 548 int routing_id) { | 548 int routing_id) { |
| 549 std::string full_event_name = base::StringPrintf( | 549 std::string full_event_name = base::StringPrintf( |
| 550 extension_popup_module_events::kOnPopupClosed, | 550 extension_popup_module_events::kOnPopupClosed, |
| 551 routing_id); | 551 routing_id); |
| 552 | 552 |
| 553 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 553 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 554 full_event_name, base::JSONWriter::kEmptyArray, profile, GURL()); | 554 full_event_name, base::JSONWriter::kEmptyArray, profile, GURL()); |
| 555 } | 555 } |
| OLD | NEW |