| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 view_->RecoverCrashedExtension(); | 171 view_->RecoverCrashedExtension(); |
| 172 } else { | 172 } else { |
| 173 CreateRenderView(NULL); | 173 CreateRenderView(NULL); |
| 174 } | 174 } |
| 175 #else | 175 #else |
| 176 CreateRenderView(NULL); | 176 CreateRenderView(NULL); |
| 177 #endif | 177 #endif |
| 178 } | 178 } |
| 179 | 179 |
| 180 void ExtensionHost::UpdatePreferredWidth(int pref_width) { | 180 void ExtensionHost::UpdatePreferredWidth(int pref_width) { |
| 181 #if defined(OS_WIN) | 181 #if defined(TOOLKIT_VIEWS) || defined(OS_LINUX) |
| 182 if (view_.get()) | 182 if (view_.get()) |
| 183 view_->DidContentsPreferredWidthChange(pref_width); | 183 view_->UpdatePreferredWidth(pref_width); |
| 184 #endif | 184 #endif |
| 185 } | 185 } |
| 186 | 186 |
| 187 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { | 187 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { |
| 188 DCHECK_EQ(render_view_host_, render_view_host); | 188 DCHECK_EQ(render_view_host_, render_view_host); |
| 189 Browser* browser = GetBrowser(); | 189 Browser* browser = GetBrowser(); |
| 190 if (browser) { | 190 if (browser) { |
| 191 TabContents* current_tab = browser->GetSelectedTabContents(); | 191 TabContents* current_tab = browser->GetSelectedTabContents(); |
| 192 if (current_tab) { | 192 if (current_tab) { |
| 193 current_tab->AddInfoBar( | 193 current_tab->AddInfoBar( |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // a toolstrip or background_page onload chrome.tabs api call can make it | 380 // a toolstrip or background_page onload chrome.tabs api call can make it |
| 381 // into here before the browser is sufficiently initialized to return here. | 381 // into here before the browser is sufficiently initialized to return here. |
| 382 // A similar situation may arise during shutdown. | 382 // A similar situation may arise during shutdown. |
| 383 // TODO(rafaelw): Delay creation of background_page until the browser | 383 // TODO(rafaelw): Delay creation of background_page until the browser |
| 384 // is available. http://code.google.com/p/chromium/issues/detail?id=13284 | 384 // is available. http://code.google.com/p/chromium/issues/detail?id=13284 |
| 385 return browser; | 385 return browser; |
| 386 } | 386 } |
| 387 | 387 |
| 388 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { | 388 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { |
| 389 } | 389 } |
| OLD | NEW |