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/extensions/extension_tab_helper.h" | 5 #include "chrome/browser/extensions/extension_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/extensions/webstore_inline_installer.h" | 8 #include "chrome/browser/extensions/webstore_inline_installer.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/sessions/restore_tab_helper.h" | 10 #include "chrome/browser/sessions/restore_tab_helper.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 SkBitmap* ExtensionTabHelper::GetExtensionAppIcon() { | 81 SkBitmap* ExtensionTabHelper::GetExtensionAppIcon() { |
82 if (extension_app_icon_.empty()) | 82 if (extension_app_icon_.empty()) |
83 return NULL; | 83 return NULL; |
84 | 84 |
85 return &extension_app_icon_; | 85 return &extension_app_icon_; |
86 } | 86 } |
87 | 87 |
88 void ExtensionTabHelper::DidNavigateMainFrame( | 88 void ExtensionTabHelper::DidNavigateMainFrame( |
89 const content::LoadCommittedDetails& details, | 89 const content::LoadCommittedDetails& details, |
90 const ViewHostMsg_FrameNavigate_Params& params) { | 90 const content::FrameNavigateParams& params) { |
91 if (details.is_in_page) | 91 if (details.is_in_page) |
92 return; | 92 return; |
93 | 93 |
94 Profile* profile = | 94 Profile* profile = |
95 Profile::FromBrowserContext(tab_contents()->browser_context()); | 95 Profile::FromBrowserContext(tab_contents()->browser_context()); |
96 ExtensionService* service = profile->GetExtensionService(); | 96 ExtensionService* service = profile->GetExtensionService(); |
97 if (!service) | 97 if (!service) |
98 return; | 98 return; |
99 | 99 |
100 for (size_t i = 0; i < service->extensions()->size(); ++i) { | 100 for (size_t i = 0; i < service->extensions()->size(); ++i) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 TabContents* ExtensionTabHelper::GetAssociatedTabContents() const { | 269 TabContents* ExtensionTabHelper::GetAssociatedTabContents() const { |
270 return tab_contents(); | 270 return tab_contents(); |
271 } | 271 } |
272 | 272 |
273 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { | 273 gfx::NativeView ExtensionTabHelper::GetNativeViewOfHost() { |
274 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); | 274 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); |
275 return rwhv ? rwhv->GetNativeView() : NULL; | 275 return rwhv ? rwhv->GetNativeView() : NULL; |
276 } | 276 } |
OLD | NEW |