| 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/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/ui/app_modal_dialogs/message_box_handler.h" | 9 #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 11 #include "chrome/common/extensions/extension_resource.h" | 11 #include "chrome/common/extensions/extension_resource.h" |
| 12 #include "chrome/common/extensions/extension_sidebar_defaults.h" | 12 #include "chrome/common/extensions/extension_sidebar_defaults.h" |
| 13 #include "chrome/common/extensions/extension_sidebar_utils.h" | 13 #include "chrome/common/extensions/extension_sidebar_utils.h" |
| 14 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
| 15 #include "content/browser/tab_contents/navigation_controller.h" | |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/browser/tab_contents/tab_contents_view.h" | 16 #include "content/browser/tab_contents/tab_contents_view.h" |
| 17 #include "content/public/browser/navigation_controller.h" |
| 18 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
| 19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
| 20 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
| 21 | 21 |
| 22 SidebarContainer::SidebarContainer(TabContents* tab, | 22 SidebarContainer::SidebarContainer(TabContents* tab, |
| 23 const std::string& content_id, | 23 const std::string& content_id, |
| 24 Delegate* delegate) | 24 Delegate* delegate) |
| 25 : tab_(tab), | 25 : tab_(tab), |
| 26 content_id_(content_id), | 26 content_id_(content_id), |
| 27 delegate_(delegate), | 27 delegate_(delegate), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 const Extension* SidebarContainer::GetExtension() const { | 123 const Extension* SidebarContainer::GetExtension() const { |
| 124 Profile* profile = | 124 Profile* profile = |
| 125 Profile::FromBrowserContext(sidebar_contents_->GetBrowserContext()); | 125 Profile::FromBrowserContext(sidebar_contents_->GetBrowserContext()); |
| 126 ExtensionService* service = profile->GetExtensionService(); | 126 ExtensionService* service = profile->GetExtensionService(); |
| 127 if (!service) | 127 if (!service) |
| 128 return NULL; | 128 return NULL; |
| 129 return service->GetExtensionById( | 129 return service->GetExtensionById( |
| 130 extension_sidebar_utils::GetExtensionIdByContentId(content_id_), false); | 130 extension_sidebar_utils::GetExtensionIdByContentId(content_id_), false); |
| 131 } | 131 } |
| OLD | NEW |