| 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/tab_helper.h" | 5 #include "chrome/browser/extensions/tab_helper.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 OnDidGetApplicationInfo) | 303 OnDidGetApplicationInfo) |
| 304 IPC_MESSAGE_HANDLER(ExtensionHostMsg_InlineWebstoreInstall, | 304 IPC_MESSAGE_HANDLER(ExtensionHostMsg_InlineWebstoreInstall, |
| 305 OnInlineWebstoreInstall) | 305 OnInlineWebstoreInstall) |
| 306 IPC_MESSAGE_HANDLER(ExtensionHostMsg_GetAppInstallState, | 306 IPC_MESSAGE_HANDLER(ExtensionHostMsg_GetAppInstallState, |
| 307 OnGetAppInstallState); | 307 OnGetAppInstallState); |
| 308 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) | 308 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
| 309 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ContentScriptsExecuting, | 309 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ContentScriptsExecuting, |
| 310 OnContentScriptsExecuting) | 310 OnContentScriptsExecuting) |
| 311 IPC_MESSAGE_HANDLER(ExtensionHostMsg_OnWatchedPageChange, | 311 IPC_MESSAGE_HANDLER(ExtensionHostMsg_OnWatchedPageChange, |
| 312 OnWatchedPageChange) | 312 OnWatchedPageChange) |
| 313 IPC_MESSAGE_UNHANDLED(handled = false) |
| 314 IPC_END_MESSAGE_MAP() |
| 315 return handled; |
| 316 } |
| 317 |
| 318 bool TabHelper::OnMessageReceived(const IPC::Message& message, |
| 319 content::RenderFrameHost* render_frame_host) { |
| 320 bool handled = true; |
| 321 IPC_BEGIN_MESSAGE_MAP(TabHelper, message) |
| 313 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DetailedConsoleMessageAdded, | 322 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DetailedConsoleMessageAdded, |
| 314 OnDetailedConsoleMessageAdded) | 323 OnDetailedConsoleMessageAdded) |
| 315 IPC_MESSAGE_UNHANDLED(handled = false) | 324 IPC_MESSAGE_UNHANDLED(handled = false) |
| 316 IPC_END_MESSAGE_MAP() | 325 IPC_END_MESSAGE_MAP() |
| 317 return handled; | 326 return handled; |
| 318 } | 327 } |
| 319 | 328 |
| 320 void TabHelper::DidCloneToNewWebContents(WebContents* old_web_contents, | 329 void TabHelper::DidCloneToNewWebContents(WebContents* old_web_contents, |
| 321 WebContents* new_web_contents) { | 330 WebContents* new_web_contents) { |
| 322 // When the WebContents that this is attached to is cloned, give the new clone | 331 // When the WebContents that this is attached to is cloned, give the new clone |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 } | 587 } |
| 579 } | 588 } |
| 580 | 589 |
| 581 void TabHelper::SetTabId(RenderViewHost* render_view_host) { | 590 void TabHelper::SetTabId(RenderViewHost* render_view_host) { |
| 582 render_view_host->Send( | 591 render_view_host->Send( |
| 583 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), | 592 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), |
| 584 SessionID::IdForTab(web_contents()))); | 593 SessionID::IdForTab(web_contents()))); |
| 585 } | 594 } |
| 586 | 595 |
| 587 } // namespace extensions | 596 } // namespace extensions |
| OLD | NEW |