| 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/ui/panels/panel.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/extensions/extension_prefs.h" | 8 #include "chrome/browser/extensions/extension_prefs.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "content/browser/renderer_host/render_view_host.h" | 11 #include "content/browser/renderer_host/render_view_host.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/panels/native_panel.h" | 13 #include "chrome/browser/ui/panels/native_panel.h" |
| 14 #include "chrome/browser/ui/panels/panel_manager.h" | 14 #include "chrome/browser/ui/panels/panel_manager.h" |
| 15 #include "chrome/browser/ui/window_sizer.h" | 15 #include "chrome/browser/ui/window_sizer.h" |
| 16 #include "chrome/browser/web_applications/web_app.h" | 16 #include "chrome/browser/web_applications/web_app.h" |
| 17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 19 #include "content/common/view_messages.h" | 19 #include "content/common/view_messages.h" |
| 20 #include "content/public/browser/notification_source.h" |
| 20 #include "content/public/browser/notification_types.h" | 21 #include "content/public/browser/notification_types.h" |
| 21 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
| 22 | 23 |
| 23 // static | 24 // static |
| 24 const Extension* Panel::GetExtensionFromBrowser(Browser* browser) { | 25 const Extension* Panel::GetExtensionFromBrowser(Browser* browser) { |
| 25 // Find the extension. When we create a panel from an extension, the extension | 26 // Find the extension. When we create a panel from an extension, the extension |
| 26 // ID is passed as the app name to the Browser. | 27 // ID is passed as the app name to the Browser. |
| 27 ExtensionService* extension_service = | 28 ExtensionService* extension_service = |
| 28 browser->GetProfile()->GetExtensionService(); | 29 browser->GetProfile()->GetExtensionService(); |
| 29 return extension_service->GetExtensionById( | 30 return extension_service->GetExtensionById( |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); | 576 RequestRenderViewHostToDisableScrollbars(GetRenderViewHost()); |
| 576 } | 577 } |
| 577 | 578 |
| 578 Browser* Panel::browser() const { | 579 Browser* Panel::browser() const { |
| 579 return native_panel_->GetPanelBrowser(); | 580 return native_panel_->GetPanelBrowser(); |
| 580 } | 581 } |
| 581 | 582 |
| 582 void Panel::DestroyBrowser() { | 583 void Panel::DestroyBrowser() { |
| 583 native_panel_->DestroyPanelBrowser(); | 584 native_panel_->DestroyPanelBrowser(); |
| 584 } | 585 } |
| OLD | NEW |