OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/extensions/extension_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_view.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
8 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 8 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
9 #include "content/browser/renderer_host/render_view_host.h" | 9 #include "content/browser/renderer_host/render_view_host.h" |
10 #include "content/browser/renderer_host/render_widget_host_view.h" | 10 #include "content/browser/renderer_host/render_widget_host_view.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 void ExtensionView::CreateWidgetHostView() { | 81 void ExtensionView::CreateWidgetHostView() { |
82 DCHECK(!initialized_); | 82 DCHECK(!initialized_); |
83 initialized_ = true; | 83 initialized_ = true; |
84 RenderWidgetHostView* view = | 84 RenderWidgetHostView* view = |
85 RenderWidgetHostView::CreateViewForWidget(render_view_host()); | 85 RenderWidgetHostView::CreateViewForWidget(render_view_host()); |
86 | 86 |
87 // TODO(mpcomplete): RWHV needs a cross-platform Init function. | 87 // TODO(mpcomplete): RWHV needs a cross-platform Init function. |
88 #if defined(OS_WIN) | 88 #if defined(USE_AURA) |
| 89 // TODO(beng): should be same as TOUCH_UI |
| 90 NOTIMPLEMENTED(); |
| 91 #elif defined(OS_WIN) |
89 // Create the HWND. Note: | 92 // Create the HWND. Note: |
90 // RenderWidgetHostHWND supports windowed plugins, but if we ever also | 93 // RenderWidgetHostHWND supports windowed plugins, but if we ever also |
91 // wanted to support constrained windows with this, we would need an | 94 // wanted to support constrained windows with this, we would need an |
92 // additional HWND to parent off of because windowed plugin HWNDs cannot | 95 // additional HWND to parent off of because windowed plugin HWNDs cannot |
93 // exist in the same z-order as constrained windows. | 96 // exist in the same z-order as constrained windows. |
94 RenderWidgetHostViewWin* view_win = | 97 RenderWidgetHostViewWin* view_win = |
95 static_cast<RenderWidgetHostViewWin*>(view); | 98 static_cast<RenderWidgetHostViewWin*>(view); |
96 HWND hwnd = view_win->Create(GetWidget()->GetNativeView()); | 99 HWND hwnd = view_win->Create(GetWidget()->GetNativeView()); |
97 view_win->ShowWindow(SW_SHOW); | 100 view_win->ShowWindow(SW_SHOW); |
98 Attach(hwnd); | 101 Attach(hwnd); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 render_view_host()->view()->SetBackground(pending_background_); | 204 render_view_host()->view()->SetBackground(pending_background_); |
202 pending_background_.reset(); | 205 pending_background_.reset(); |
203 } | 206 } |
204 | 207 |
205 // Tell the renderer not to draw scroll bars in popups unless the | 208 // Tell the renderer not to draw scroll bars in popups unless the |
206 // popups are at the maximum allowed size. | 209 // popups are at the maximum allowed size. |
207 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 210 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, |
208 ExtensionPopup::kMaxHeight); | 211 ExtensionPopup::kMaxHeight); |
209 host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 212 host_->DisableScrollbarsForSmallWindows(largest_popup_size); |
210 } | 213 } |
OLD | NEW |