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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 extension_app_(NULL), | 81 extension_app_(NULL), |
82 extension_function_dispatcher_( | 82 extension_function_dispatcher_( |
83 Profile::FromBrowserContext(web_contents->GetBrowserContext()), | 83 Profile::FromBrowserContext(web_contents->GetBrowserContext()), |
84 this), | 84 this), |
85 pending_web_app_action_(NONE), | 85 pending_web_app_action_(NONE), |
86 last_committed_page_id_(-1), | 86 last_committed_page_id_(-1), |
87 update_shortcut_on_load_complete_(false), | 87 update_shortcut_on_load_complete_(false), |
88 script_executor_( | 88 script_executor_( |
89 new ScriptExecutor(web_contents, &script_execution_observers_)), | 89 new ScriptExecutor(web_contents, &script_execution_observers_)), |
90 location_bar_controller_(new LocationBarController(web_contents)), | 90 location_bar_controller_(new LocationBarController(web_contents)), |
| 91 active_script_controller_(new ActiveScriptController(web_contents)), |
91 image_loader_ptr_factory_(this), | 92 image_loader_ptr_factory_(this), |
92 webstore_inline_installer_factory_(new WebstoreInlineInstallerFactory()) { | 93 webstore_inline_installer_factory_(new WebstoreInlineInstallerFactory()) { |
93 // The ActiveTabPermissionManager requires a session ID; ensure this | 94 // The ActiveTabPermissionManager requires a session ID; ensure this |
94 // WebContents has one. | 95 // WebContents has one. |
95 SessionTabHelper::CreateForWebContents(web_contents); | 96 SessionTabHelper::CreateForWebContents(web_contents); |
96 if (web_contents->GetRenderViewHost()) | 97 if (web_contents->GetRenderViewHost()) |
97 SetTabId(web_contents->GetRenderViewHost()); | 98 SetTabId(web_contents->GetRenderViewHost()); |
98 active_tab_permission_granter_.reset(new ActiveTabPermissionGranter( | 99 active_tab_permission_granter_.reset(new ActiveTabPermissionGranter( |
99 web_contents, | 100 web_contents, |
100 SessionTabHelper::IdForTab(web_contents), | 101 SessionTabHelper::IdForTab(web_contents), |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 } | 535 } |
535 } | 536 } |
536 | 537 |
537 void TabHelper::SetTabId(RenderViewHost* render_view_host) { | 538 void TabHelper::SetTabId(RenderViewHost* render_view_host) { |
538 render_view_host->Send( | 539 render_view_host->Send( |
539 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), | 540 new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), |
540 SessionTabHelper::IdForTab(web_contents()))); | 541 SessionTabHelper::IdForTab(web_contents()))); |
541 } | 542 } |
542 | 543 |
543 } // namespace extensions | 544 } // namespace extensions |
OLD | NEW |