| 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 "content/browser/tab_contents/tab_contents.h" | 11 #include "content/browser/tab_contents/tab_contents.h" |
| 12 #include "content/browser/tab_contents/tab_contents_view.h" | 12 #include "content/browser/tab_contents/tab_contents_view.h" |
| 13 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
| 14 #include "ui/views/widget/widget.h" | 14 #include "views/widget/widget.h" |
| 15 | 15 |
| 16 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) | 16 ExtensionView::ExtensionView(ExtensionHost* host, Browser* browser) |
| 17 : host_(host), | 17 : host_(host), |
| 18 browser_(browser), | 18 browser_(browser), |
| 19 initialized_(false), | 19 initialized_(false), |
| 20 container_(NULL), | 20 container_(NULL), |
| 21 is_clipped_(false) { | 21 is_clipped_(false) { |
| 22 host_->set_view(this); | 22 host_->set_view(this); |
| 23 | 23 |
| 24 // This view needs to be focusable so it can act as the focused view for the | 24 // This view needs to be focusable so it can act as the focused view for the |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 render_view_host()->view()->SetBackground(pending_background_); | 158 render_view_host()->view()->SetBackground(pending_background_); |
| 159 pending_background_.reset(); | 159 pending_background_.reset(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 // Tell the renderer not to draw scroll bars in popups unless the | 162 // Tell the renderer not to draw scroll bars in popups unless the |
| 163 // popups are at the maximum allowed size. | 163 // popups are at the maximum allowed size. |
| 164 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 164 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, |
| 165 ExtensionPopup::kMaxHeight); | 165 ExtensionPopup::kMaxHeight); |
| 166 host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 166 host_->DisableScrollbarsForSmallWindows(largest_popup_size); |
| 167 } | 167 } |
| OLD | NEW |