Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: chrome/browser/extensions/extension_host.h

Issue 2883057: Add debuggin CHECK to help track down ExtensionHost crasher (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: cr comment Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 9 #include <string>
10 #include <list>
10 11
11 #include "base/perftimer.h" 12 #include "base/perftimer.h"
12 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
13 #include "chrome/browser/extensions/extension_function_dispatcher.h" 14 #include "chrome/browser/extensions/extension_function_dispatcher.h"
14 #include "chrome/browser/jsmessage_box_client.h" 15 #include "chrome/browser/jsmessage_box_client.h"
15 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 16 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
16 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" 17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
17 #if defined(TOOLKIT_VIEWS) 18 #if defined(TOOLKIT_VIEWS)
18 #include "chrome/browser/views/extensions/extension_view.h" 19 #include "chrome/browser/views/extensions/extension_view.h"
19 #elif defined(OS_MACOSX) 20 #elif defined(OS_MACOSX)
(...skipping 21 matching lines...) Expand all
41 public RenderViewHostDelegate::View, 42 public RenderViewHostDelegate::View,
42 public ExtensionFunctionDispatcher::Delegate, 43 public ExtensionFunctionDispatcher::Delegate,
43 public NotificationObserver, 44 public NotificationObserver,
44 public JavaScriptMessageBoxClient { 45 public JavaScriptMessageBoxClient {
45 public: 46 public:
46 class ProcessCreationQueue; 47 class ProcessCreationQueue;
47 48
48 // Enable DOM automation in created render view hosts. 49 // Enable DOM automation in created render view hosts.
49 static void EnableDOMAutomation() { enable_dom_automation_ = true; } 50 static void EnableDOMAutomation() { enable_dom_automation_ = true; }
50 51
52 typedef std::list<ExtensionHost*> HostPointerList;
53 static HostPointerList* recently_deleted();
54
51 ExtensionHost(Extension* extension, SiteInstance* site_instance, 55 ExtensionHost(Extension* extension, SiteInstance* site_instance,
52 const GURL& url, ViewType::Type host_type); 56 const GURL& url, ViewType::Type host_type);
53 ~ExtensionHost(); 57 ~ExtensionHost();
54 58
55 #if defined(TOOLKIT_VIEWS) 59 #if defined(TOOLKIT_VIEWS)
56 void set_view(ExtensionView* view) { view_.reset(view); } 60 void set_view(ExtensionView* view) { view_.reset(view); }
57 ExtensionView* view() const { return view_.get(); } 61 ExtensionView* view() const { return view_.get(); }
58 #elif defined(OS_MACOSX) 62 #elif defined(OS_MACOSX)
59 ExtensionViewMac* view() const { return view_.get(); } 63 ExtensionViewMac* view() const { return view_.get(); }
60 #elif defined(TOOLKIT_GTK) 64 #elif defined(TOOLKIT_GTK)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // The relevant TabContents associated with this ExtensionHost, if any. 274 // The relevant TabContents associated with this ExtensionHost, if any.
271 TabContents* associated_tab_contents_; 275 TabContents* associated_tab_contents_;
272 276
273 // 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.
274 PerfTimer since_created_; 278 PerfTimer since_created_;
275 279
276 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 280 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
277 }; 281 };
278 282
279 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 283 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698