| 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/extensions/extension_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 content::Source<Profile>(profile_), | 159 content::Source<Profile>(profile_), |
| 160 content::Details<ExtensionHost>(this)); | 160 content::Details<ExtensionHost>(this)); |
| 161 ProcessCreationQueue::GetInstance()->Remove(this); | 161 ProcessCreationQueue::GetInstance()->Remove(this); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void ExtensionHost::CreateView(Browser* browser) { | 164 void ExtensionHost::CreateView(Browser* browser) { |
| 165 #if defined(TOOLKIT_VIEWS) | 165 #if defined(TOOLKIT_VIEWS) |
| 166 view_.reset(new ExtensionView(this, browser)); | 166 view_.reset(new ExtensionView(this, browser)); |
| 167 // We own |view_|, so don't auto delete when it's removed from the view | 167 // We own |view_|, so don't auto delete when it's removed from the view |
| 168 // hierarchy. | 168 // hierarchy. |
| 169 view_->set_parent_owned(false); | 169 view_->set_owned_by_client(); |
| 170 #elif defined(OS_MACOSX) | 170 #elif defined(OS_MACOSX) |
| 171 view_.reset(new ExtensionViewMac(this, browser)); | 171 view_.reset(new ExtensionViewMac(this, browser)); |
| 172 view_->Init(); | 172 view_->Init(); |
| 173 #elif defined(TOOLKIT_GTK) | 173 #elif defined(TOOLKIT_GTK) |
| 174 view_.reset(new ExtensionViewGtk(this, browser)); | 174 view_.reset(new ExtensionViewGtk(this, browser)); |
| 175 view_->Init(); | 175 view_->Init(); |
| 176 #else | 176 #else |
| 177 // TODO(port) | 177 // TODO(port) |
| 178 NOTREACHED(); | 178 NOTREACHED(); |
| 179 #endif | 179 #endif |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 params.user_gesture = user_gesture; | 575 params.user_gesture = user_gesture; |
| 576 browser::Navigate(¶ms); | 576 browser::Navigate(¶ms); |
| 577 } | 577 } |
| 578 | 578 |
| 579 void ExtensionHost::RenderViewReady() { | 579 void ExtensionHost::RenderViewReady() { |
| 580 content::NotificationService::current()->Notify( | 580 content::NotificationService::current()->Notify( |
| 581 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 581 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
| 582 content::Source<Profile>(profile_), | 582 content::Source<Profile>(profile_), |
| 583 content::Details<ExtensionHost>(this)); | 583 content::Details<ExtensionHost>(this)); |
| 584 } | 584 } |
| OLD | NEW |