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

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

Issue 9146028: Define the public interface for content browser SiteInstance. This interface is implemented by th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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 14 matching lines...) Expand all
25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
26 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
27 #include "chrome/common/chrome_notification_types.h" 27 #include "chrome/common/chrome_notification_types.h"
28 #include "chrome/common/chrome_view_type.h" 28 #include "chrome/common/chrome_view_type.h"
29 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/extensions/extension_constants.h" 30 #include "chrome/common/extensions/extension_constants.h"
31 #include "chrome/common/extensions/extension_messages.h" 31 #include "chrome/common/extensions/extension_messages.h"
32 #include "chrome/common/render_messages.h" 32 #include "chrome/common/render_messages.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "content/browser/renderer_host/render_view_host.h" 34 #include "content/browser/renderer_host/render_view_host.h"
35 #include "content/browser/site_instance.h"
36 #include "content/public/browser/content_browser_client.h" 35 #include "content/public/browser/content_browser_client.h"
37 #include "content/public/browser/native_web_keyboard_event.h" 36 #include "content/public/browser/native_web_keyboard_event.h"
38 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
39 #include "content/public/browser/render_process_host.h" 38 #include "content/public/browser/render_process_host.h"
39 #include "content/public/browser/site_instance.h"
40 #include "content/public/browser/web_contents.h" 40 #include "content/public/browser/web_contents.h"
41 #include "content/public/browser/web_contents_view.h" 41 #include "content/public/browser/web_contents_view.h"
42 #include "grit/browser_resources.h" 42 #include "grit/browser_resources.h"
43 #include "grit/chromium_strings.h" 43 #include "grit/chromium_strings.h"
44 #include "grit/generated_resources.h" 44 #include "grit/generated_resources.h"
45 #include "ui/base/keycodes/keyboard_codes.h" 45 #include "ui/base/keycodes/keyboard_codes.h"
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)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 typedef std::list<ExtensionHost*> Queue; 109 typedef std::list<ExtensionHost*> Queue;
110 Queue queue_; 110 Queue queue_;
111 bool pending_create_; 111 bool pending_create_;
112 base::WeakPtrFactory<ProcessCreationQueue> ptr_factory_; 112 base::WeakPtrFactory<ProcessCreationQueue> ptr_factory_;
113 }; 113 };
114 114
115 //////////////// 115 ////////////////
116 // ExtensionHost 116 // ExtensionHost
117 117
118 ExtensionHost::ExtensionHost(const Extension* extension, 118 ExtensionHost::ExtensionHost(const Extension* extension,
119 SiteInstance* site_instance, 119 content::SiteInstance* site_instance,
120 const GURL& url, 120 const GURL& url,
121 content::ViewType host_type) 121 content::ViewType host_type)
122 : extension_(extension), 122 : extension_(extension),
123 extension_id_(extension->id()), 123 extension_id_(extension->id()),
124 profile_(Profile::FromBrowserContext( 124 profile_(Profile::FromBrowserContext(
125 site_instance->GetBrowserContext())), 125 site_instance->GetBrowserContext())),
126 render_view_host_(NULL), 126 render_view_host_(NULL),
127 did_stop_loading_(false), 127 did_stop_loading_(false),
128 document_element_available_(false), 128 document_element_available_(false),
129 initial_url_(url), 129 initial_url_(url),
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 browser::Navigate(&params); 548 browser::Navigate(&params);
549 } 549 }
550 550
551 551
552 void ExtensionHost::RenderViewReady() { 552 void ExtensionHost::RenderViewReady() {
553 content::NotificationService::current()->Notify( 553 content::NotificationService::current()->Notify(
554 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 554 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
555 content::Source<Profile>(profile_), 555 content::Source<Profile>(profile_),
556 content::Details<ExtensionHost>(this)); 556 content::Details<ExtensionHost>(this));
557 } 557 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698