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

Side by Side Diff: chrome/browser/tab_contents/web_contents_view_win.cc

Issue 19677: Clean up the Windows-ness in the sizing of new views. Write a bunch of commen... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/tab_contents/web_contents_view_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/tab_contents/web_contents_view_win.h" 5 #include "chrome/browser/tab_contents/web_contents_view_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" 9 #include "chrome/browser/bookmarks/bookmark_drag_data.h"
10 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. 10 #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Since we create these windows parented to the desktop window initially, we 57 // Since we create these windows parented to the desktop window initially, we
58 // don't want to create them initially visible. 58 // don't want to create them initially visible.
59 set_window_style(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); 59 set_window_style(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
60 WidgetWin::Init(GetDesktopWindow(), gfx::Rect(), false); 60 WidgetWin::Init(GetDesktopWindow(), gfx::Rect(), false);
61 61
62 // Remove the root view drop target so we can register our own. 62 // Remove the root view drop target so we can register our own.
63 RevokeDragDrop(GetHWND()); 63 RevokeDragDrop(GetHWND());
64 drop_target_ = new WebDropTarget(GetHWND(), web_contents_); 64 drop_target_ = new WebDropTarget(GetHWND(), web_contents_);
65 } 65 }
66 66
67 RenderWidgetHostViewWin* WebContentsViewWin::CreateViewForWidget( 67 RenderWidgetHostView* WebContentsViewWin::CreateViewForWidget(
68 RenderWidgetHost* render_widget_host) { 68 RenderWidgetHost* render_widget_host) {
69 DCHECK(!render_widget_host->view()); 69 DCHECK(!render_widget_host->view());
70 RenderWidgetHostViewWin* view = 70 RenderWidgetHostViewWin* view =
71 new RenderWidgetHostViewWin(render_widget_host); 71 new RenderWidgetHostViewWin(render_widget_host);
72 view->Create(GetHWND()); 72 view->Create(GetHWND());
73 view->ShowWindow(SW_SHOW); 73 view->ShowWindow(SW_SHOW);
74 return view; 74 return view;
75 } 75 }
76 76
77 gfx::NativeView WebContentsViewWin::GetNativeView() const { 77 gfx::NativeView WebContentsViewWin::GetNativeView() const {
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 } 665 }
666 return false; 666 return false;
667 } 667 }
668 668
669 void WebContentsViewWin::WheelZoom(int distance) { 669 void WebContentsViewWin::WheelZoom(int distance) {
670 if (web_contents_->delegate()) { 670 if (web_contents_->delegate()) {
671 bool zoom_in = distance > 0; 671 bool zoom_in = distance > 0;
672 web_contents_->delegate()->ContentsZoomChange(zoom_in); 672 web_contents_->delegate()->ContentsZoomChange(zoom_in);
673 } 673 }
674 } 674 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698