| 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" | 
|  | 9 #include "chrome/browser/extensions/extension_service.h" | 
|  | 10 #include "chrome/browser/profiles/profile.h" | 
| 8 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" | 
| 9 #include "chrome/browser/ui/panels/panel_manager.h" | 12 #include "chrome/browser/ui/panels/panel_manager.h" | 
|  | 13 #include "chrome/browser/web_applications/web_app.h" | 
|  | 14 #include "chrome/common/extensions/extension.h" | 
| 10 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" | 
| 11 | 16 | 
|  | 17 // static | 
|  | 18 const Extension* Panel::GetExtension(Browser* browser) { | 
|  | 19   // Find the extension. When we create a panel from an extension, the extension | 
|  | 20   // ID is passed as the app name to the Browser. | 
|  | 21   ExtensionService* extension_service = | 
|  | 22       browser->GetProfile()->GetExtensionService(); | 
|  | 23   return extension_service->GetExtensionById( | 
|  | 24       web_app::GetExtensionIdFromApplicationName(browser->app_name()), false); | 
|  | 25 } | 
|  | 26 | 
| 12 Panel::Panel(Browser* browser, const gfx::Rect& bounds) | 27 Panel::Panel(Browser* browser, const gfx::Rect& bounds) | 
| 13     : bounds_(bounds), | 28     : bounds_(bounds), | 
| 14 #ifndef NDEBUG | 29 #ifndef NDEBUG | 
| 15       closing_(false), | 30       closing_(false), | 
| 16 #endif | 31 #endif | 
| 17       minimized_(false) { | 32       minimized_(false) { | 
| 18   browser_window_.reset(CreateNativePanel(browser, this)); | 33   browser_window_.reset(CreateNativePanel(browser, this)); | 
| 19 } | 34 } | 
| 20 | 35 | 
| 21 Panel::~Panel() { | 36 Panel::~Panel() { | 
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 377 | 392 | 
| 378 #if defined(OS_CHROMEOS) | 393 #if defined(OS_CHROMEOS) | 
| 379 void Panel::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { | 394 void Panel::ShowKeyboardOverlay(gfx::NativeWindow owning_window) { | 
| 380   NOTIMPLEMENTED(); | 395   NOTIMPLEMENTED(); | 
| 381 } | 396 } | 
| 382 #endif | 397 #endif | 
| 383 | 398 | 
| 384 void Panel::DestroyBrowser() { | 399 void Panel::DestroyBrowser() { | 
| 385   NOTIMPLEMENTED(); | 400   NOTIMPLEMENTED(); | 
| 386 } | 401 } | 
| OLD | NEW | 
|---|