| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/extensions/extension_view.h" | 5 #include "chrome/browser/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/views/extensions/extension_popup.h" | 10 #include "chrome/browser/views/extensions/extension_popup.h" | 
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 166 void ExtensionView::PreferredSizeChanged() { | 166 void ExtensionView::PreferredSizeChanged() { | 
| 167   View::PreferredSizeChanged(); | 167   View::PreferredSizeChanged(); | 
| 168   if (container_) { | 168   if (container_) { | 
| 169     container_->OnExtensionPreferredSizeChanged(this); | 169     container_->OnExtensionPreferredSizeChanged(this); | 
| 170   } | 170   } | 
| 171 } | 171 } | 
| 172 | 172 | 
| 173 bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { | 173 bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { | 
| 174   // Let the tab key event be processed by the renderer (instead of moving the | 174   // Let the tab key event be processed by the renderer (instead of moving the | 
| 175   // focus to the next focusable view). | 175   // focus to the next focusable view). | 
| 176   return (e.GetKeyCode() == base::VKEY_TAB); | 176   return (e.GetKeyCode() == app::VKEY_TAB); | 
| 177 } | 177 } | 
| 178 | 178 | 
| 179 void ExtensionView::HandleMouseMove() { | 179 void ExtensionView::HandleMouseMove() { | 
| 180   if (container_) | 180   if (container_) | 
| 181     container_->OnExtensionMouseMove(this); | 181     container_->OnExtensionMouseMove(this); | 
| 182 } | 182 } | 
| 183 | 183 | 
| 184 void ExtensionView::HandleMouseLeave() { | 184 void ExtensionView::HandleMouseLeave() { | 
| 185   if (container_) | 185   if (container_) | 
| 186     container_->OnExtensionMouseLeave(this); | 186     container_->OnExtensionMouseLeave(this); | 
| 187 } | 187 } | 
| 188 | 188 | 
| 189 void ExtensionView::RenderViewCreated() { | 189 void ExtensionView::RenderViewCreated() { | 
| 190   if (!pending_background_.empty() && render_view_host()->view()) { | 190   if (!pending_background_.empty() && render_view_host()->view()) { | 
| 191     render_view_host()->view()->SetBackground(pending_background_); | 191     render_view_host()->view()->SetBackground(pending_background_); | 
| 192     pending_background_.reset(); | 192     pending_background_.reset(); | 
| 193   } | 193   } | 
| 194 | 194 | 
| 195   // Tell the renderer not to draw scroll bars in popups unless the | 195   // Tell the renderer not to draw scroll bars in popups unless the | 
| 196   // popups are at the maximum allowed size. | 196   // popups are at the maximum allowed size. | 
| 197   gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 197   gfx::Size largest_popup_size(ExtensionPopup::kMaxWidth, | 
| 198                                ExtensionPopup::kMaxHeight); | 198                                ExtensionPopup::kMaxHeight); | 
| 199   host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 199   host_->DisableScrollbarsForSmallWindows(largest_popup_size); | 
| 200 } | 200 } | 
| OLD | NEW | 
|---|