| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
| 47 #include "ui/base/resource/resource_bundle.h" | 47 #include "ui/base/resource/resource_bundle.h" |
| 48 | 48 |
| 49 #if defined(TOOLKIT_VIEWS) | 49 #if defined(TOOLKIT_VIEWS) |
| 50 #include "ui/views/widget/widget.h" | 50 #include "ui/views/widget/widget.h" |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 using WebKit::WebDragOperation; | 53 using WebKit::WebDragOperation; |
| 54 using WebKit::WebDragOperationsMask; | 54 using WebKit::WebDragOperationsMask; |
| 55 using content::OpenURLParams; | 55 using content::OpenURLParams; |
| 56 using content::RenderViewHost; |
| 56 using content::SiteInstance; | 57 using content::SiteInstance; |
| 57 using content::WebContents; | 58 using content::WebContents; |
| 58 | 59 |
| 59 // Helper class that rate-limits the creation of renderer processes for | 60 // Helper class that rate-limits the creation of renderer processes for |
| 60 // ExtensionHosts, to avoid blocking the UI. | 61 // ExtensionHosts, to avoid blocking the UI. |
| 61 class ExtensionHost::ProcessCreationQueue { | 62 class ExtensionHost::ProcessCreationQueue { |
| 62 public: | 63 public: |
| 63 static ProcessCreationQueue* GetInstance() { | 64 static ProcessCreationQueue* GetInstance() { |
| 64 return Singleton<ProcessCreationQueue>::get(); | 65 return Singleton<ProcessCreationQueue>::get(); |
| 65 } | 66 } |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 params.user_gesture = user_gesture; | 570 params.user_gesture = user_gesture; |
| 570 browser::Navigate(¶ms); | 571 browser::Navigate(¶ms); |
| 571 } | 572 } |
| 572 | 573 |
| 573 void ExtensionHost::RenderViewReady() { | 574 void ExtensionHost::RenderViewReady() { |
| 574 content::NotificationService::current()->Notify( | 575 content::NotificationService::current()->Notify( |
| 575 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 576 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
| 576 content::Source<Profile>(profile_), | 577 content::Source<Profile>(profile_), |
| 577 content::Details<ExtensionHost>(this)); | 578 content::Details<ExtensionHost>(this)); |
| 578 } | 579 } |
| OLD | NEW |