| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void ExtensionView::PreferredSizeChanged() { | 173 void ExtensionView::PreferredSizeChanged() { |
| 174 View::PreferredSizeChanged(); | 174 View::PreferredSizeChanged(); |
| 175 if (container_) { | 175 if (container_) { |
| 176 container_->OnExtensionPreferredSizeChanged(this); | 176 container_->OnExtensionPreferredSizeChanged(this); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { | 180 bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { |
| 181 // Let the tab key event be processed by the renderer (instead of moving the | 181 // Let the tab key event be processed by the renderer (instead of moving the |
| 182 // focus to the next focusable view). | 182 // focus to the next focusable view). |
| 183 return (e.GetKeyCode() == app::VKEY_TAB); | 183 return (e.GetKeyCode() == ui::VKEY_TAB); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void ExtensionView::HandleMouseMove() { | 186 void ExtensionView::HandleMouseMove() { |
| 187 if (container_) | 187 if (container_) |
| 188 container_->OnExtensionMouseMove(this); | 188 container_->OnExtensionMouseMove(this); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ExtensionView::HandleMouseLeave() { | 191 void ExtensionView::HandleMouseLeave() { |
| 192 if (container_) | 192 if (container_) |
| 193 container_->OnExtensionMouseLeave(this); | 193 container_->OnExtensionMouseLeave(this); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void ExtensionView::RenderViewCreated() { | 196 void ExtensionView::RenderViewCreated() { |
| 197 if (!pending_background_.empty() && render_view_host()->view()) { | 197 if (!pending_background_.empty() && render_view_host()->view()) { |
| 198 render_view_host()->view()->SetBackground(pending_background_); | 198 render_view_host()->view()->SetBackground(pending_background_); |
| 199 pending_background_.reset(); | 199 pending_background_.reset(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 // Tell the renderer not to draw scroll bars in popups unless the | 202 // Tell the renderer not to draw scroll bars in popups unless the |
| 203 // popups are at the maximum allowed size. | 203 // popups are at the maximum allowed size. |
| 204 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 204 gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, |
| 205 ExtensionPopup::kMaxHeight); | 205 ExtensionPopup::kMaxHeight); |
| 206 host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 206 host_->DisableScrollbarsForSmallWindows(largest_popup_size); |
| 207 } | 207 } |
| OLD | NEW |