| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 Details<ExtensionHost>(this)); | 101 Details<ExtensionHost>(this)); |
| 102 render_view_host_->Shutdown(); // deletes render_view_host | 102 render_view_host_->Shutdown(); // deletes render_view_host |
| 103 } | 103 } |
| 104 | 104 |
| 105 void ExtensionHost::CreateView(Browser* browser) { | 105 void ExtensionHost::CreateView(Browser* browser) { |
| 106 #if defined(TOOLKIT_VIEWS) | 106 #if defined(TOOLKIT_VIEWS) |
| 107 view_.reset(new ExtensionView(this, browser)); | 107 view_.reset(new ExtensionView(this, browser)); |
| 108 // We own |view_|, so don't auto delete when it's removed from the view | 108 // We own |view_|, so don't auto delete when it's removed from the view |
| 109 // hierarchy. | 109 // hierarchy. |
| 110 view_->SetParentOwned(false); | 110 view_->SetParentOwned(false); |
| 111 #elif defined(OS_LINUX) |
| 112 // FIXME(phajdan.jr): Add extension view for GTK. |
| 111 #else | 113 #else |
| 112 // TODO(port) | 114 // TODO(port) |
| 113 NOTREACHED(); | 115 NOTREACHED(); |
| 114 #endif | 116 #endif |
| 115 } | 117 } |
| 116 | 118 |
| 117 RenderProcessHost* ExtensionHost::render_process_host() const { | 119 RenderProcessHost* ExtensionHost::render_process_host() const { |
| 118 return render_view_host_->process(); | 120 return render_view_host_->process(); |
| 119 } | 121 } |
| 120 | 122 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // A similar situation may arise during shutdown. | 320 // A similar situation may arise during shutdown. |
| 319 // TODO(rafaelw): Delay creation of background_page until the browser | 321 // TODO(rafaelw): Delay creation of background_page until the browser |
| 320 // is available. http://code.google.com/p/chromium/issues/detail?id=13284 | 322 // is available. http://code.google.com/p/chromium/issues/detail?id=13284 |
| 321 return browser; | 323 return browser; |
| 322 } | 324 } |
| 323 | 325 |
| 324 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { | 326 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { |
| 325 extension_function_dispatcher_.reset( | 327 extension_function_dispatcher_.reset( |
| 326 new ExtensionFunctionDispatcher(render_view_host_, this, url_)); | 328 new ExtensionFunctionDispatcher(render_view_host_, this, url_)); |
| 327 } | 329 } |
| OLD | NEW |