| 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 "chrome/browser/extensions/crx_installer.h" | 7 #include "chrome/browser/extensions/crx_installer.h" |
| 8 #include "chrome/browser/extensions/app_notify_channel_ui.h" | 8 #include "chrome/browser/extensions/app_notify_channel_ui.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_tab_util.h" | 10 #include "chrome/browser/extensions/extension_tab_util.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 extension_function_dispatcher_(tab_contents->profile(), this)), | 59 extension_function_dispatcher_(tab_contents->profile(), this)), |
| 60 pending_web_app_action_(NONE), | 60 pending_web_app_action_(NONE), |
| 61 tab_contents_(tab_contents), | 61 tab_contents_(tab_contents), |
| 62 script_executor_(tab_contents->web_contents()), | 62 script_executor_(tab_contents->web_contents()), |
| 63 active_tab_permission_manager_( | 63 active_tab_permission_manager_( |
| 64 tab_contents->web_contents(), | 64 tab_contents->web_contents(), |
| 65 SessionID::IdForTab(tab_contents), | 65 SessionID::IdForTab(tab_contents), |
| 66 tab_contents->profile()) { | 66 tab_contents->profile()) { |
| 67 if (switch_utils::AreScriptBadgesEnabled()) { | 67 if (switch_utils::AreScriptBadgesEnabled()) { |
| 68 location_bar_controller_.reset(new ScriptBadgeController( | 68 location_bar_controller_.reset(new ScriptBadgeController( |
| 69 tab_contents, &script_executor_)); | 69 tab_contents->web_contents(), &script_executor_)); |
| 70 } else { | 70 } else { |
| 71 location_bar_controller_.reset(new PageActionController(tab_contents)); | 71 location_bar_controller_.reset( |
| 72 new PageActionController(tab_contents->web_contents())); |
| 72 } | 73 } |
| 73 registrar_.Add(this, | 74 registrar_.Add(this, |
| 74 content::NOTIFICATION_LOAD_STOP, | 75 content::NOTIFICATION_LOAD_STOP, |
| 75 content::Source<NavigationController>( | 76 content::Source<NavigationController>( |
| 76 &tab_contents->web_contents()->GetController())); | 77 &tab_contents->web_contents()->GetController())); |
| 77 } | 78 } |
| 78 | 79 |
| 79 TabHelper::~TabHelper() { | 80 TabHelper::~TabHelper() { |
| 80 } | 81 } |
| 81 | 82 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // malware site etc). When this happens, we abort the shortcut update. | 436 // malware site etc). When this happens, we abort the shortcut update. |
| 436 NavigationEntry* entry = controller.GetLastCommittedEntry(); | 437 NavigationEntry* entry = controller.GetLastCommittedEntry(); |
| 437 if (entry) | 438 if (entry) |
| 438 GetApplicationInfo(entry->GetPageID()); | 439 GetApplicationInfo(entry->GetPageID()); |
| 439 else | 440 else |
| 440 pending_web_app_action_ = NONE; | 441 pending_web_app_action_ = NONE; |
| 441 } | 442 } |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace extensions | 445 } // namespace extensions |
| OLD | NEW |