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 <list> | 7 #include <list> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void ExtensionHost::UpdatePreferredSize(const gfx::Size& new_size) { | 241 void ExtensionHost::UpdatePreferredSize(const gfx::Size& new_size) { |
242 if (view_.get()) | 242 if (view_.get()) |
243 view_->UpdatePreferredSize(new_size); | 243 view_->UpdatePreferredSize(new_size); |
244 } | 244 } |
245 | 245 |
246 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { | 246 void ExtensionHost::RenderViewGone(RenderViewHost* render_view_host) { |
247 LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name(); | 247 LOG(INFO) << "Sending EXTENSION_PROCESS_CRASHED for " + extension_->name(); |
248 DCHECK_EQ(render_view_host_, render_view_host); | 248 DCHECK_EQ(render_view_host_, render_view_host); |
249 NotificationService::current()->Notify( | 249 NotificationService::current()->Notify( |
250 NotificationType::EXTENSION_PROCESS_CRASHED, | 250 NotificationType::EXTENSION_PROCESS_CRASHED, |
251 Source<ExtensionsService>(profile_->GetExtensionsService()), | 251 Source<Profile>(profile_), |
252 Details<ExtensionHost>(this)); | 252 Details<ExtensionHost>(this)); |
253 } | 253 } |
254 | 254 |
255 void ExtensionHost::DidNavigate(RenderViewHost* render_view_host, | 255 void ExtensionHost::DidNavigate(RenderViewHost* render_view_host, |
256 const ViewHostMsg_FrameNavigate_Params& params) { | 256 const ViewHostMsg_FrameNavigate_Params& params) { |
257 // We only care when the outer frame changes. | 257 // We only care when the outer frame changes. |
258 switch (params.transition) { | 258 switch (params.transition) { |
259 case PageTransition::AUTO_SUBFRAME: | 259 case PageTransition::AUTO_SUBFRAME: |
260 case PageTransition::MANUAL_SUBFRAME: | 260 case PageTransition::MANUAL_SUBFRAME: |
261 return; | 261 return; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 window_id = ExtensionTabUtil::GetWindowId( | 577 window_id = ExtensionTabUtil::GetWindowId( |
578 const_cast<ExtensionHost* >(this)->GetBrowser()); | 578 const_cast<ExtensionHost* >(this)->GetBrowser()); |
579 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { | 579 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { |
580 // Background page is not attached to any browser window, so pass -1. | 580 // Background page is not attached to any browser window, so pass -1. |
581 window_id = -1; | 581 window_id = -1; |
582 } else { | 582 } else { |
583 NOTREACHED(); | 583 NOTREACHED(); |
584 } | 584 } |
585 return window_id; | 585 return window_id; |
586 } | 586 } |
OLD | NEW |