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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 if (container_) | 179 if (container_) |
180 container_->OnViewWasResized(); | 180 container_->OnViewWasResized(); |
181 } | 181 } |
182 | 182 |
183 void ExtensionViewViews::HandleKeyboardEvent( | 183 void ExtensionViewViews::HandleKeyboardEvent( |
184 const content::NativeWebKeyboardEvent& event) { | 184 const content::NativeWebKeyboardEvent& event) { |
185 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 185 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
186 GetFocusManager()); | 186 GetFocusManager()); |
187 } | 187 } |
OLD | NEW |