| 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" |
| 11 #include "views/widget/widget.h" | 11 #include "views/widget/widget.h" |
| 12 | 12 |
| 13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
| 14 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" | 14 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 15 #elif defined(TOUCH_UI) | 15 #elif defined(TOUCH_UI) |
| 16 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" | 16 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" |
| 17 #elif defined(TOOLKIT_USES_GTK) | 17 #elif defined(TOOLKIT_USES_GTK) |
| 18 #include "chrome/browser/renderer_host/render_widget_host_view_gtk.h" | 18 #include "content/browser/renderer_host/render_widget_host_view_gtk.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) | 21 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) |
| 22 : host_(host), | 22 : host_(host), |
| 23 browser_(browser), | 23 browser_(browser), |
| 24 initialized_(false), | 24 initialized_(false), |
| 25 container_(NULL), | 25 container_(NULL), |
| 26 is_clipped_(false) { | 26 is_clipped_(false) { |
| 27 host_->set_view(this); | 27 host_->set_view(this); |
| 28 | 28 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 render_view_host()->view()->SetBackground(pending_background_); | 201 render_view_host()->view()->SetBackground(pending_background_); |
| 202 pending_background_.reset(); | 202 pending_background_.reset(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 // Tell the renderer not to draw scroll bars in popups unless the | 205 // Tell the renderer not to draw scroll bars in popups unless the |
| 206 // popups are at the maximum allowed size. | 206 // popups are at the maximum allowed size. |
| 207 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 207 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, |
| 208 ExtensionPopup::kMaxHeight); | 208 ExtensionPopup::kMaxHeight); |
| 209 host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 209 host_->DisableScrollbarsForSmallWindows(largest_popup_size); |
| 210 } | 210 } |
| OLD | NEW |