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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 void ExtensionHost::InsertInfobarCSS() { | 327 void ExtensionHost::InsertInfobarCSS() { |
328 DCHECK(!is_background_page()); | 328 DCHECK(!is_background_page()); |
329 | 329 |
330 static const base::StringPiece css( | 330 static const base::StringPiece css( |
331 ResourceBundle::GetSharedInstance().GetRawDataResource( | 331 ResourceBundle::GetSharedInstance().GetRawDataResource( |
332 IDR_EXTENSIONS_INFOBAR_CSS, ui::SCALE_FACTOR_NONE)); | 332 IDR_EXTENSIONS_INFOBAR_CSS, ui::SCALE_FACTOR_NONE)); |
333 | 333 |
334 render_view_host()->InsertCSS(string16(), css.as_string()); | 334 render_view_host()->InsertCSS(string16(), css.as_string()); |
335 } | 335 } |
336 | 336 |
337 void ExtensionHost::DidStopLoading() { | 337 void ExtensionHost::DidStopLoading(content::RenderViewHost* render_view_host) { |
338 bool notify = !did_stop_loading_; | 338 bool notify = !did_stop_loading_; |
339 did_stop_loading_ = true; | 339 did_stop_loading_ = true; |
340 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP || | 340 if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_POPUP || |
341 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG || | 341 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_DIALOG || |
342 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR || | 342 extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_INFOBAR || |
343 extension_host_type_ == chrome::VIEW_TYPE_PANEL) { | 343 extension_host_type_ == chrome::VIEW_TYPE_PANEL) { |
344 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) | 344 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) |
345 if (view()) | 345 if (view()) |
346 view()->DidStopLoading(); | 346 view()->DidStopLoading(); |
347 #endif | 347 #endif |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 ExtensionTabUtil::CreateTab(new_contents, extension_id_, disposition, | 591 ExtensionTabUtil::CreateTab(new_contents, extension_id_, disposition, |
592 initial_pos, user_gesture); | 592 initial_pos, user_gesture); |
593 } | 593 } |
594 | 594 |
595 void ExtensionHost::RenderViewReady() { | 595 void ExtensionHost::RenderViewReady() { |
596 content::NotificationService::current()->Notify( | 596 content::NotificationService::current()->Notify( |
597 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 597 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
598 content::Source<Profile>(profile_), | 598 content::Source<Profile>(profile_), |
599 content::Details<ExtensionHost>(this)); | 599 content::Details<ExtensionHost>(this)); |
600 } | 600 } |
OLD | NEW |