| 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/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" | 
| 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 
| 10 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 10 #include "chrome/browser/ui/views/extensions/extension_popup.h" | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 26       is_clipped_(false) { | 26       is_clipped_(false) { | 
| 27   host_->set_view(this); | 27   host_->set_view(this); | 
| 28 | 28 | 
| 29   // This view needs to be focusable so it can act as the focused view for the | 29   // This view needs to be focusable so it can act as the focused view for the | 
| 30   // focus manager. This is required to have SkipDefaultKeyEventProcessing | 30   // focus manager. This is required to have SkipDefaultKeyEventProcessing | 
| 31   // called so the tab key events are forwarded to the renderer. | 31   // called so the tab key events are forwarded to the renderer. | 
| 32   SetFocusable(true); | 32   SetFocusable(true); | 
| 33 } | 33 } | 
| 34 | 34 | 
| 35 ExtensionView::~ExtensionView() { | 35 ExtensionView::~ExtensionView() { | 
| 36   View* parent = GetParent(); | 36   if (parent()) | 
| 37   if (parent) | 37     parent()->RemoveChildView(this); | 
| 38     parent->RemoveChildView(this); |  | 
| 39   CleanUp(); | 38   CleanUp(); | 
| 40 } | 39 } | 
| 41 | 40 | 
| 42 const Extension* ExtensionView::extension() const { | 41 const Extension* ExtensionView::extension() const { | 
| 43   return host_->extension(); | 42   return host_->extension(); | 
| 44 } | 43 } | 
| 45 | 44 | 
| 46 RenderViewHost* ExtensionView::render_view_host() const { | 45 RenderViewHost* ExtensionView::render_view_host() const { | 
| 47   return host_->render_view_host(); | 46   return host_->render_view_host(); | 
| 48 } | 47 } | 
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 196     render_view_host()->view()->SetBackground(pending_background_); | 195     render_view_host()->view()->SetBackground(pending_background_); | 
| 197     pending_background_.reset(); | 196     pending_background_.reset(); | 
| 198   } | 197   } | 
| 199 | 198 | 
| 200   // Tell the renderer not to draw scroll bars in popups unless the | 199   // Tell the renderer not to draw scroll bars in popups unless the | 
| 201   // popups are at the maximum allowed size. | 200   // popups are at the maximum allowed size. | 
| 202   gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 201   gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 
| 203                                ExtensionPopup::kMaxHeight); | 202                                ExtensionPopup::kMaxHeight); | 
| 204   host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 203   host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 
| 205 } | 204 } | 
| OLD | NEW | 
|---|