| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/browser/content_browser_client.h" | 9 #include "content/public/browser/content_browser_client.h" |
| 10 #include "content/public/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ExtensionView::~ExtensionView() { | 30 ExtensionView::~ExtensionView() { |
| 31 if (parent()) | 31 if (parent()) |
| 32 parent()->RemoveChildView(this); | 32 parent()->RemoveChildView(this); |
| 33 CleanUp(); | 33 CleanUp(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 const Extension* ExtensionView::extension() const { | 36 const Extension* ExtensionView::extension() const { |
| 37 return host_->extension(); | 37 return host_->extension(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 RenderViewHost* ExtensionView::render_view_host() const { | 40 content::RenderViewHost* ExtensionView::render_view_host() const { |
| 41 return host_->render_view_host(); | 41 return host_->render_view_host(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void ExtensionView::DidStopLoading() { | 44 void ExtensionView::DidStopLoading() { |
| 45 ShowIfCompletelyLoaded(); | 45 ShowIfCompletelyLoaded(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void ExtensionView::SetIsClipped(bool is_clipped) { | 48 void ExtensionView::SetIsClipped(bool is_clipped) { |
| 49 if (is_clipped_ != is_clipped) { | 49 if (is_clipped_ != is_clipped) { |
| 50 is_clipped_ = is_clipped; | 50 is_clipped_ = is_clipped; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // Tell the renderer not to draw scroll bars in popups unless the | 166 // Tell the renderer not to draw scroll bars in popups unless the |
| 167 // popups are at the maximum allowed size. | 167 // popups are at the maximum allowed size. |
| 168 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 168 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, |
| 169 ExtensionPopup::kMaxHeight); | 169 ExtensionPopup::kMaxHeight); |
| 170 host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 170 host_->DisableScrollbarsForSmallWindows(largest_popup_size); |
| 171 | 171 |
| 172 if (container_) | 172 if (container_) |
| 173 container_->OnViewWasResized(); | 173 container_->OnViewWasResized(); |
| 174 } | 174 } |
| OLD | NEW |