OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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.h" | 5 #include "chrome/browser/extensions/extension_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/character_encoding.h" | 9 #include "chrome/browser/character_encoding.h" |
10 #include "chrome/browser/extensions/extension.h" | 10 #include "chrome/browser/extensions/extension.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 const GURL& url, | 32 const GURL& url, |
33 SiteInstance* instance, | 33 SiteInstance* instance, |
34 Browser* browser) | 34 Browser* browser) |
35 : HWNDHtmlView(url, this, false, instance), | 35 : HWNDHtmlView(url, this, false, instance), |
36 extension_(extension), | 36 extension_(extension), |
37 browser_(browser), | 37 browser_(browser), |
38 did_stop_loading_(false), | 38 did_stop_loading_(false), |
39 pending_preferred_width_(0) { | 39 pending_preferred_width_(0) { |
40 } | 40 } |
41 | 41 |
| 42 ExtensionFunctionDispatcher* ExtensionView:: |
| 43 CreateExtensionFunctionDispatcher(RenderViewHost *render_view_host, |
| 44 const std::string& extension_id) { |
| 45 return new ExtensionFunctionDispatcher(render_view_host, browser_, |
| 46 extension_id); |
| 47 } |
| 48 |
42 void ExtensionView::ShowIfCompletelyLoaded() { | 49 void ExtensionView::ShowIfCompletelyLoaded() { |
43 // We wait to show the ExtensionView until it has loaded and our parent has | 50 // We wait to show the ExtensionView until it has loaded and our parent has |
44 // given us a background. These can happen in different orders. | 51 // given us a background. These can happen in different orders. |
45 if (did_stop_loading_ && !render_view_host()->view()->background().empty()) { | 52 if (did_stop_loading_ && !render_view_host()->view()->background().empty()) { |
46 SetVisible(true); | 53 SetVisible(true); |
47 DidContentsPreferredWidthChange(pending_preferred_width_); | 54 DidContentsPreferredWidthChange(pending_preferred_width_); |
48 } | 55 } |
49 } | 56 } |
50 | 57 |
51 void ExtensionView::SetBackground(const SkBitmap& background) { | 58 void ExtensionView::SetBackground(const SkBitmap& background) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 176 } |
170 | 177 |
171 void ExtensionView::UpdateDragCursor(bool is_drop_target) { | 178 void ExtensionView::UpdateDragCursor(bool is_drop_target) { |
172 } | 179 } |
173 | 180 |
174 void ExtensionView::TakeFocus(bool reverse) { | 181 void ExtensionView::TakeFocus(bool reverse) { |
175 } | 182 } |
176 | 183 |
177 void ExtensionView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { | 184 void ExtensionView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { |
178 } | 185 } |
OLD | NEW |