| 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/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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
| 23 #include "content/public/browser/notification_types.h" | 23 #include "content/public/browser/notification_types.h" |
| 24 #include "content/public/browser/render_view_host.h" | 24 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 26 #include "ui/gfx/rect.h" | 26 #include "ui/gfx/rect.h" |
| 27 | 27 |
| 28 #if defined(USE_AURA) | 28 #if defined(USE_AURA) |
| 29 #include "chrome/browser/ui/panels/panel_browser_view.h" | 29 #include "chrome/browser/ui/panels/panel_browser_view.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 using content::RenderViewHost; |
| 32 using content::SSLStatus; | 33 using content::SSLStatus; |
| 33 using content::WebContents; | 34 using content::WebContents; |
| 34 | 35 |
| 35 // static | 36 // static |
| 36 const Extension* Panel::GetExtensionFromBrowser(Browser* browser) { | 37 const Extension* Panel::GetExtensionFromBrowser(Browser* browser) { |
| 37 // Find the extension. When we create a panel from an extension, the extension | 38 // Find the extension. When we create a panel from an extension, the extension |
| 38 // ID is passed as the app name to the Browser. | 39 // ID is passed as the app name to the Browser. |
| 39 ExtensionService* extension_service = | 40 ExtensionService* extension_service = |
| 40 browser->GetProfile()->GetExtensionService(); | 41 browser->GetProfile()->GetExtensionService(); |
| 41 return extension_service->GetExtensionById( | 42 return extension_service->GetExtensionById( |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 native_panel_->ContentSizeFromWindowSize(max_size_)); | 678 native_panel_->ContentSizeFromWindowSize(max_size_)); |
| 678 } | 679 } |
| 679 | 680 |
| 680 void Panel::OnWindowSizeAvailable() { | 681 void Panel::OnWindowSizeAvailable() { |
| 681 ConfigureAutoResize(browser()->GetSelectedWebContents()); | 682 ConfigureAutoResize(browser()->GetSelectedWebContents()); |
| 682 } | 683 } |
| 683 | 684 |
| 684 void Panel::DestroyBrowser() { | 685 void Panel::DestroyBrowser() { |
| 685 native_panel_->DestroyPanelBrowser(); | 686 native_panel_->DestroyPanelBrowser(); |
| 686 } | 687 } |
| OLD | NEW |