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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "ui/base/layout.h" | 53 #include "ui/base/layout.h" |
54 #include "ui/base/resource/resource_bundle.h" | 54 #include "ui/base/resource/resource_bundle.h" |
55 | 55 |
56 using WebKit::WebDragOperation; | 56 using WebKit::WebDragOperation; |
57 using WebKit::WebDragOperationsMask; | 57 using WebKit::WebDragOperationsMask; |
58 using content::NativeWebKeyboardEvent; | 58 using content::NativeWebKeyboardEvent; |
59 using content::OpenURLParams; | 59 using content::OpenURLParams; |
60 using content::RenderViewHost; | 60 using content::RenderViewHost; |
61 using content::SiteInstance; | 61 using content::SiteInstance; |
62 using content::WebContents; | 62 using content::WebContents; |
| 63 using extensions::ExtensionSystem; |
63 | 64 |
64 // Helper class that rate-limits the creation of renderer processes for | 65 // Helper class that rate-limits the creation of renderer processes for |
65 // ExtensionHosts, to avoid blocking the UI. | 66 // ExtensionHosts, to avoid blocking the UI. |
66 class ExtensionHost::ProcessCreationQueue { | 67 class ExtensionHost::ProcessCreationQueue { |
67 public: | 68 public: |
68 static ProcessCreationQueue* GetInstance() { | 69 static ProcessCreationQueue* GetInstance() { |
69 return Singleton<ProcessCreationQueue>::get(); | 70 return Singleton<ProcessCreationQueue>::get(); |
70 } | 71 } |
71 | 72 |
72 // Add a host to the queue for RenderView creation. | 73 // Add a host to the queue for RenderView creation. |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 params.user_gesture = user_gesture; | 612 params.user_gesture = user_gesture; |
612 chrome::Navigate(¶ms); | 613 chrome::Navigate(¶ms); |
613 } | 614 } |
614 | 615 |
615 void ExtensionHost::RenderViewReady() { | 616 void ExtensionHost::RenderViewReady() { |
616 content::NotificationService::current()->Notify( | 617 content::NotificationService::current()->Notify( |
617 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, | 618 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, |
618 content::Source<Profile>(profile_), | 619 content::Source<Profile>(profile_), |
619 content::Details<ExtensionHost>(this)); | 620 content::Details<ExtensionHost>(this)); |
620 } | 621 } |
OLD | NEW |