OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/api/messaging/message_service.h" | 5 #include "chrome/browser/extensions/api/messaging/message_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "chrome/browser/extensions/api/messaging/extension_message_port.h" | 19 #include "chrome/browser/extensions/api/messaging/extension_message_port.h" |
20 #include "chrome/browser/extensions/api/messaging/incognito_connectability.h" | 20 #include "chrome/browser/extensions/api/messaging/incognito_connectability.h" |
21 #include "chrome/browser/extensions/api/messaging/native_message_port.h" | 21 #include "chrome/browser/extensions/api/messaging/native_message_port.h" |
22 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" | 22 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
23 #include "chrome/browser/extensions/extension_service.h" | 23 #include "chrome/browser/extensions/extension_service.h" |
24 #include "chrome/browser/extensions/extension_tab_util.h" | 24 #include "chrome/browser/extensions/extension_tab_util.h" |
25 #include "chrome/browser/extensions/extension_util.h" | |
26 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/tab_contents/tab_util.h" | 26 #include "chrome/browser/tab_contents/tab_util.h" |
28 #include "components/guest_view/common/guest_view_constants.h" | 27 #include "components/guest_view/common/guest_view_constants.h" |
29 #include "components/prefs/pref_service.h" | 28 #include "components/prefs/pref_service.h" |
30 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
31 #include "content/public/browser/render_frame_host.h" | 30 #include "content/public/browser/render_frame_host.h" |
32 #include "content/public/browser/render_process_host.h" | 31 #include "content/public/browser/render_process_host.h" |
33 #include "content/public/browser/render_view_host.h" | 32 #include "content/public/browser/render_view_host.h" |
34 #include "content/public/browser/render_widget_host.h" | 33 #include "content/public/browser/render_widget_host.h" |
35 #include "content/public/browser/render_widget_host_view.h" | 34 #include "content/public/browser/render_widget_host_view.h" |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 MessageChannelMap::iterator channel_iter = channels_.find(channel_id); | 987 MessageChannelMap::iterator channel_iter = channels_.find(channel_id); |
989 if (channel_iter != channels_.end()) { | 988 if (channel_iter != channels_.end()) { |
990 for (const PendingMessage& message : queue) { | 989 for (const PendingMessage& message : queue) { |
991 DispatchMessage(message.first, channel_iter->second.get(), | 990 DispatchMessage(message.first, channel_iter->second.get(), |
992 message.second); | 991 message.second); |
993 } | 992 } |
994 } | 993 } |
995 } | 994 } |
996 | 995 |
997 } // namespace extensions | 996 } // namespace extensions |
OLD | NEW |