Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_view_win.cc

Issue 9254046: Custom frame UI for platform apps on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_win.h" 10 #include "content/browser/renderer_host/render_widget_host_view_win.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // to receive scroll messages from ThinkPad touch-pad driver. Suppress 274 // to receive scroll messages from ThinkPad touch-pad driver. Suppress
275 // painting of scrollbars by returning 0 size for them. 275 // painting of scrollbars by returning 0 size for them.
276 return 0; 276 return 0;
277 } 277 }
278 278
279 void NativeTabContentsViewWin::OnNCPaint(HRGN rgn) { 279 void NativeTabContentsViewWin::OnNCPaint(HRGN rgn) {
280 // Suppress default WM_NCPAINT handling. We don't need to do anything 280 // Suppress default WM_NCPAINT handling. We don't need to do anything
281 // here since the view will draw everything correctly. 281 // here since the view will draw everything correctly.
282 } 282 }
283 283
284 LRESULT NativeTabContentsViewWin::OnNCHitTest(const CPoint& point) {
285 // Allow hit tests to fall through to the parent window.
286 SetMsgHandled(true);
287 return HTTRANSPARENT;
288 }
289
284 //////////////////////////////////////////////////////////////////////////////// 290 ////////////////////////////////////////////////////////////////////////////////
285 // NativeTabContentsViewWin, private: 291 // NativeTabContentsViewWin, private:
286 292
287 void NativeTabContentsViewWin::ScrollCommon(UINT message, int scroll_type, 293 void NativeTabContentsViewWin::ScrollCommon(UINT message, int scroll_type,
288 short position, HWND scrollbar) { 294 short position, HWND scrollbar) {
289 // This window can receive scroll events as a result of the ThinkPad's 295 // This window can receive scroll events as a result of the ThinkPad's
290 // touch-pad scroll wheel emulation. 296 // touch-pad scroll wheel emulation.
291 if (!ScrollZoom(scroll_type)) { 297 if (!ScrollZoom(scroll_type)) {
292 // Reflect scroll message to the view() to give it a chance 298 // Reflect scroll message to the view() to give it a chance
293 // to process scrolling. 299 // to process scrolling.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 335 }
330 336
331 //////////////////////////////////////////////////////////////////////////////// 337 ////////////////////////////////////////////////////////////////////////////////
332 // NativeTabContentsView, public: 338 // NativeTabContentsView, public:
333 339
334 // static 340 // static
335 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView( 341 NativeTabContentsView* NativeTabContentsView::CreateNativeTabContentsView(
336 internal::NativeTabContentsViewDelegate* delegate) { 342 internal::NativeTabContentsViewDelegate* delegate) {
337 return new NativeTabContentsViewWin(delegate); 343 return new NativeTabContentsViewWin(delegate);
338 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698