| 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_views.h" | 5 #include "chrome/browser/ui/views/extensions/extension_view_views.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 11 matching lines...) Expand all Loading... |
| 22 ExtensionViewViews::ExtensionViewViews(extensions::ExtensionHost* host, | 22 ExtensionViewViews::ExtensionViewViews(extensions::ExtensionHost* host, |
| 23 Browser* browser) | 23 Browser* browser) |
| 24 : host_(host), | 24 : host_(host), |
| 25 browser_(browser), | 25 browser_(browser), |
| 26 initialized_(false), | 26 initialized_(false), |
| 27 container_(NULL), | 27 container_(NULL), |
| 28 is_clipped_(false) { | 28 is_clipped_(false) { |
| 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 set_focusable(true); | 32 SetFocusable(true); |
| 33 } | 33 } |
| 34 | 34 |
| 35 ExtensionViewViews::~ExtensionViewViews() { | 35 ExtensionViewViews::~ExtensionViewViews() { |
| 36 if (parent()) | 36 if (parent()) |
| 37 parent()->RemoveChildView(this); | 37 parent()->RemoveChildView(this); |
| 38 CleanUp(); | 38 CleanUp(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 const extensions::Extension* ExtensionViewViews::extension() const { | 41 const extensions::Extension* ExtensionViewViews::extension() const { |
| 42 return host_->extension(); | 42 return host_->extension(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 if (container_) | 169 if (container_) |
| 170 container_->OnViewWasResized(); | 170 container_->OnViewWasResized(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void ExtensionViewViews::HandleKeyboardEvent( | 173 void ExtensionViewViews::HandleKeyboardEvent( |
| 174 const content::NativeWebKeyboardEvent& event) { | 174 const content::NativeWebKeyboardEvent& event) { |
| 175 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 175 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
| 176 GetFocusManager()); | 176 GetFocusManager()); |
| 177 } | 177 } |
| OLD | NEW |