| 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/tab_contents/native_tab_contents_view_win.h" | 5 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include "chrome/browser/tab_contents/web_drop_target_win.h" | 7 #include "chrome/browser/tab_contents/web_drop_target_win.h" |
| 8 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" | 8 #include "chrome/browser/ui/views/tab_contents/native_tab_contents_view_delegate
.h" |
| 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" | 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_drag_win.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_view.h" | 10 #include "content/browser/renderer_host/render_widget_host_view.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // to receive scroll messages from ThinkPad touch-pad driver. Suppress | 275 // to receive scroll messages from ThinkPad touch-pad driver. Suppress |
| 276 // painting of scrollbars by returning 0 size for them. | 276 // painting of scrollbars by returning 0 size for them. |
| 277 return 0; | 277 return 0; |
| 278 } | 278 } |
| 279 | 279 |
| 280 void NativeTabContentsViewWin::OnNCPaint(HRGN rgn) { | 280 void NativeTabContentsViewWin::OnNCPaint(HRGN rgn) { |
| 281 // Suppress default WM_NCPAINT handling. We don't need to do anything | 281 // Suppress default WM_NCPAINT handling. We don't need to do anything |
| 282 // here since the view will draw everything correctly. | 282 // here since the view will draw everything correctly. |
| 283 } | 283 } |
| 284 | 284 |
| 285 LRESULT NativeTabContentsViewWin::OnNCHitTest(const CPoint& point) { |
| 286 // Allow hit tests to fall through to the parent window. |
| 287 SetMsgHandled(true); |
| 288 return HTTRANSPARENT; |
| 289 } |
| 290 |
| 285 //////////////////////////////////////////////////////////////////////////////// | 291 //////////////////////////////////////////////////////////////////////////////// |
| 286 // NativeTabContentsViewWin, private: | 292 // NativeTabContentsViewWin, private: |
| 287 | 293 |
| 288 void NativeTabContentsViewWin::ScrollCommon(UINT message, int scroll_type, | 294 void NativeTabContentsViewWin::ScrollCommon(UINT message, int scroll_type, |
| 289 short position, HWND scrollbar) { | 295 short position, HWND scrollbar) { |
| 290 // This window can receive scroll events as a result of the ThinkPad's | 296 // This window can receive scroll events as a result of the ThinkPad's |
| 291 // touch-pad scroll wheel emulation. | 297 // touch-pad scroll wheel emulation. |
| 292 if (!ScrollZoom(scroll_type)) { | 298 if (!ScrollZoom(scroll_type)) { |
| 293 // Reflect scroll message to the view() to give it a chance | 299 // Reflect scroll message to the view() to give it a chance |
| 294 // to process scrolling. | 300 // to process scrolling. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 336 } |
| 331 | 337 |
| 332 //////////////////////////////////////////////////////////////////////////////// | 338 //////////////////////////////////////////////////////////////////////////////// |
| 333 // NativeTabContentsView, public: | 339 // NativeTabContentsView, public: |
| 334 | 340 |
| 335 // static | 341 // static |
| 336 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( | 342 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( |
| 337 internal::NativeTabContentsViewDelegate* delegate) { | 343 internal::NativeTabContentsViewDelegate* delegate) { |
| 338 return new NativeTabContentsViewWin(delegate); | 344 return new NativeTabContentsViewWin(delegate); |
| 339 } | 345 } |
| OLD | NEW |