Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 152003: Fix some issues with extension messaging: (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_message_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void ExtensionHost::UpdatePreferredWidth(int pref_width) { 142 void ExtensionHost::UpdatePreferredWidth(int pref_width) {
143 #if defined(OS_WIN) 143 #if defined(OS_WIN)
144 if (view_.get()) 144 if (view_.get())
145 view_->DidContentsPreferredWidthChange(pref_width); 145 view_->DidContentsPreferredWidthChange(pref_width);
146 #endif 146 #endif
147 } 147 }
148 148
149 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { 149 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) {
150 DCHECK_EQ(render_view_host_, render_view_host); 150 DCHECK_EQ(render_view_host_, render_view_host);
151 TabContents* current_tab = GetBrowser()->GetSelectedTabContents(); 151 TabContents* current_tab = GetBrowser()->GetSelectedTabContents();
152 DCHECK(current_tab);
153 if (current_tab) { 152 if (current_tab) {
154 current_tab->AddInfoBar( 153 current_tab->AddInfoBar(
155 new CrashedExtensionInfobarDelegate(current_tab, this)); 154 new CrashedExtensionInfobarDelegate(current_tab, this));
156 } 155 }
157 NotificationService::current()->Notify( 156 NotificationService::current()->Notify(
158 NotificationType::EXTENSION_PROCESS_CRASHED, 157 NotificationType::EXTENSION_PROCESS_CRASHED,
159 Source<Profile>(profile_), 158 Source<Profile>(profile_),
160 Details<ExtensionHost>(this)); 159 Details<ExtensionHost>(this));
161 } 160 }
162 161
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 int request_id, 303 int request_id,
305 bool has_callback) { 304 bool has_callback) {
306 extension_function_dispatcher_->HandleRequest(message, content, request_id, 305 extension_function_dispatcher_->HandleRequest(message, content, request_id,
307 has_callback); 306 has_callback);
308 } 307 }
309 308
310 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) { 309 void ExtensionHost::RenderViewCreated(RenderViewHost* render_view_host) {
311 extension_function_dispatcher_.reset( 310 extension_function_dispatcher_.reset(
312 new ExtensionFunctionDispatcher(render_view_host_, this, url_)); 311 new ExtensionFunctionDispatcher(render_view_host_, this, url_));
313 } 312 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_message_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698