OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_view_host_factory.h" | 5 #include "chrome/browser/extensions/extension_view_host_factory.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_util.h" | 7 #include "chrome/browser/extensions/extension_util.h" |
8 #include "chrome/browser/extensions/extension_view_host.h" | 8 #include "chrome/browser/extensions/extension_view_host.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 | 107 |
108 // static | 108 // static |
109 ExtensionViewHost* ExtensionViewHostFactory::CreateDialogHost( | 109 ExtensionViewHost* ExtensionViewHostFactory::CreateDialogHost( |
110 const GURL& url, | 110 const GURL& url, |
111 Profile* profile) { | 111 Profile* profile) { |
112 DCHECK(profile); | 112 DCHECK(profile); |
113 return CreateViewHost(url, profile, NULL, VIEW_TYPE_EXTENSION_DIALOG); | 113 return CreateViewHost(url, profile, NULL, VIEW_TYPE_EXTENSION_DIALOG); |
114 } | 114 } |
115 | 115 |
| 116 // static |
| 117 ExtensionViewHost* ExtensionViewHostFactory::CreateSidebarHost( |
| 118 const GURL& url, |
| 119 Browser* browser) { |
| 120 DCHECK(browser); |
| 121 return CreateViewHost(url, browser->profile(), browser, |
| 122 VIEW_TYPE_EXTENSION_SIDEBAR); |
| 123 } |
| 124 |
116 } // namespace extensions | 125 } // namespace extensions |
OLD | NEW |