OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/sidebar/sidebar_container.h" | 5 #include "chrome/browser/sidebar/sidebar_container.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 9 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
10 #include "chrome/common/bindings_policy.h" | |
11 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/extensions/extension_resource.h" | 11 #include "chrome/common/extensions/extension_resource.h" |
13 #include "chrome/common/extensions/extension_sidebar_defaults.h" | 12 #include "chrome/common/extensions/extension_sidebar_defaults.h" |
14 #include "chrome/common/extensions/extension_sidebar_utils.h" | 13 #include "chrome/common/extensions/extension_sidebar_utils.h" |
15 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
16 #include "content/browser/tab_contents/navigation_controller.h" | 15 #include "content/browser/tab_contents/navigation_controller.h" |
17 #include "content/browser/tab_contents/navigation_entry.h" | 16 #include "content/browser/tab_contents/navigation_entry.h" |
18 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
19 #include "content/browser/tab_contents/tab_contents_view.h" | 18 #include "content/browser/tab_contents/tab_contents_view.h" |
| 19 #include "content/common/bindings_policy.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "third_party/skia/include/core/SkBitmap.h" | 21 #include "third_party/skia/include/core/SkBitmap.h" |
22 | 22 |
23 SidebarContainer::SidebarContainer(TabContents* tab, | 23 SidebarContainer::SidebarContainer(TabContents* tab, |
24 const std::string& content_id, | 24 const std::string& content_id, |
25 Delegate* delegate) | 25 Delegate* delegate) |
26 : tab_(tab), | 26 : tab_(tab), |
27 content_id_(content_id), | 27 content_id_(content_id), |
28 delegate_(delegate), | 28 delegate_(delegate), |
29 icon_(new SkBitmap), | 29 icon_(new SkBitmap), |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 const Extension* SidebarContainer::GetExtension() const { | 130 const Extension* SidebarContainer::GetExtension() const { |
131 ExtensionService* service = | 131 ExtensionService* service = |
132 sidebar_contents_->profile()->GetExtensionService(); | 132 sidebar_contents_->profile()->GetExtensionService(); |
133 if (!service) | 133 if (!service) |
134 return NULL; | 134 return NULL; |
135 return service->GetExtensionById( | 135 return service->GetExtensionById( |
136 extension_sidebar_utils::GetExtensionIdByContentId(content_id_), false); | 136 extension_sidebar_utils::GetExtensionIdByContentId(content_id_), false); |
137 } | 137 } |
OLD | NEW |