OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | |
10 #include <string> | 9 #include <string> |
11 #include <vector> | 10 #include <vector> |
12 | 11 |
13 #include "base/perftimer.h" | 12 #include "base/perftimer.h" |
14 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
15 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 14 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
16 #include "chrome/browser/js_modal_dialog.h" | 15 #include "chrome/browser/js_modal_dialog.h" |
17 #include "chrome/browser/renderer_host/render_view_host_delegate.h" | 16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" |
18 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
19 #if defined(TOOLKIT_VIEWS) | 18 #if defined(TOOLKIT_VIEWS) |
(...skipping 21 matching lines...) Expand all Loading... |
41 public RenderViewHostDelegate::View, | 40 public RenderViewHostDelegate::View, |
42 public ExtensionFunctionDispatcher::Delegate, | 41 public ExtensionFunctionDispatcher::Delegate, |
43 public NotificationObserver, | 42 public NotificationObserver, |
44 public JavaScriptAppModalDialogDelegate { | 43 public JavaScriptAppModalDialogDelegate { |
45 public: | 44 public: |
46 class ProcessCreationQueue; | 45 class ProcessCreationQueue; |
47 | 46 |
48 // Enable DOM automation in created render view hosts. | 47 // Enable DOM automation in created render view hosts. |
49 static void EnableDOMAutomation() { enable_dom_automation_ = true; } | 48 static void EnableDOMAutomation() { enable_dom_automation_ = true; } |
50 | 49 |
51 typedef std::list<ExtensionHost*> HostPointerList; | |
52 static HostPointerList* recently_deleted(); | |
53 | |
54 ExtensionHost(const Extension* extension, SiteInstance* site_instance, | 50 ExtensionHost(const Extension* extension, SiteInstance* site_instance, |
55 const GURL& url, ViewType::Type host_type); | 51 const GURL& url, ViewType::Type host_type); |
56 ~ExtensionHost(); | 52 ~ExtensionHost(); |
57 | 53 |
58 #if defined(TOOLKIT_VIEWS) | 54 #if defined(TOOLKIT_VIEWS) |
59 void set_view(ExtensionView* view) { view_.reset(view); } | 55 void set_view(ExtensionView* view) { view_.reset(view); } |
60 ExtensionView* view() const { return view_.get(); } | 56 ExtensionView* view() const { return view_.get(); } |
61 #elif defined(OS_MACOSX) | 57 #elif defined(OS_MACOSX) |
62 ExtensionViewMac* view() const { return view_.get(); } | 58 ExtensionViewMac* view() const { return view_.get(); } |
63 #elif defined(TOOLKIT_GTK) | 59 #elif defined(TOOLKIT_GTK) |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Used to measure how long it's been since the host was created. | 277 // Used to measure how long it's been since the host was created. |
282 PerfTimer since_created_; | 278 PerfTimer since_created_; |
283 | 279 |
284 // FileSelectHelper, lazily created. | 280 // FileSelectHelper, lazily created. |
285 scoped_ptr<FileSelectHelper> file_select_helper_; | 281 scoped_ptr<FileSelectHelper> file_select_helper_; |
286 | 282 |
287 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 283 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
288 }; | 284 }; |
289 | 285 |
290 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 286 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
OLD | NEW |