OLD | NEW |
1 // Copyright (c) 2011 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/remoting/firewall_traversal_observer.h" | 5 #include "chrome/browser/remoting/firewall_traversal_observer.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
15 #include "content/common/notification_service.h" | 15 #include "content/public/browser/notification_details.h" |
| 16 #include "content/public/browser/notification_source.h" |
16 #include "content/common/view_messages.h" | 17 #include "content/common/view_messages.h" |
17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
18 | 19 |
19 FirewallTraversalObserver::FirewallTraversalObserver( | 20 FirewallTraversalObserver::FirewallTraversalObserver( |
20 TabContents* tab_contents) | 21 TabContents* tab_contents) |
21 : TabContentsObserver(tab_contents) { | 22 : TabContentsObserver(tab_contents) { |
22 // Register for notifications about all interested prefs change. | 23 // Register for notifications about all interested prefs change. |
23 Profile* profile = | 24 Profile* profile = |
24 Profile::FromBrowserContext(tab_contents->browser_context()); | 25 Profile::FromBrowserContext(tab_contents->browser_context()); |
25 PrefService* prefs = profile->GetPrefs(); | 26 PrefService* prefs = profile->GetPrefs(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 IPC_BEGIN_MESSAGE_MAP(FirewallTraversalObserver, msg) | 89 IPC_BEGIN_MESSAGE_MAP(FirewallTraversalObserver, msg) |
89 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal, | 90 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal, |
90 UpdateFirewallTraversalState) | 91 UpdateFirewallTraversalState) |
91 | 92 |
92 // Have the super handle all other messages. | 93 // Have the super handle all other messages. |
93 IPC_MESSAGE_UNHANDLED(handled = false) | 94 IPC_MESSAGE_UNHANDLED(handled = false) |
94 IPC_END_MESSAGE_MAP() | 95 IPC_END_MESSAGE_MAP() |
95 | 96 |
96 return handled; | 97 return handled; |
97 } | 98 } |
OLD | NEW |