OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/extensions/base_extension_host.h" |
| 6 |
| 7 #include "chrome/browser/ui/browser.h" |
| 8 |
| 9 BaseExtensionHost::~BaseExtensionHost() {} |
| 10 |
| 11 void BaseExtensionHost::CreateView(Browser* browser) { |
| 12 #if defined(TOOLKIT_VIEWS) |
| 13 view_.reset(new ExtensionView(this, browser)); |
| 14 // We own |view_|, so don't auto delete when it's removed from the view |
| 15 // hierarchy. |
| 16 view_->set_parent_owned(false); |
| 17 #elif defined(OS_MACOSX) |
| 18 view_.reset(new ExtensionViewMac(this, browser)); |
| 19 view_->Init(); |
| 20 #elif defined(TOOLKIT_GTK) |
| 21 view_.reset(new ExtensionViewGtk(this, browser)); |
| 22 view_->Init(); |
| 23 #else |
| 24 // TODO(port) |
| 25 NOTREACHED(); |
| 26 #endif |
| 27 } |
OLD | NEW |