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

Side by Side Diff: content/browser/web_contents/web_contents_view_win.cc

Issue 10409029: Add a factory function to create WebContentsView implementations. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix android Created 8 years, 7 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 | « content/browser/web_contents/web_contents_view_mac.mm ('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) 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 "content/browser/web_contents/web_contents_view_win.h" 5 #include "content/browser/web_contents/web_contents_view_win.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/renderer_host/render_view_host_factory.h" 8 #include "content/browser/renderer_host/render_view_host_factory.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.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"
11 #include "content/browser/web_contents/interstitial_page_impl.h" 11 #include "content/browser/web_contents/interstitial_page_impl.h"
12 #include "content/browser/web_contents/web_contents_drag_win.h" 12 #include "content/browser/web_contents/web_contents_drag_win.h"
13 #include "content/browser/web_contents/web_contents_impl.h" 13 #include "content/browser/web_contents/web_contents_impl.h"
14 #include "content/browser/web_contents/web_drag_dest_win.h" 14 #include "content/browser/web_contents/web_drag_dest_win.h"
15 #include "content/public/browser/web_contents_delegate.h" 15 #include "content/public/browser/web_contents_delegate.h"
16 #include "content/public/browser/web_contents_view_delegate.h" 16 #include "content/public/browser/web_contents_view_delegate.h"
17 #include "ui/gfx/screen.h" 17 #include "ui/gfx/screen.h"
18 18
19 using content::RenderViewHost; 19 using content::RenderViewHost;
20 using content::RenderWidgetHostView; 20 using content::RenderWidgetHostView;
21 using content::WebContents; 21 using content::WebContents;
22 using content::WebContentsViewDelegate; 22 using content::WebContentsViewDelegate;
23 23
24 namespace content {
25 WebContentsView* CreateWebContentsView(WebContentsImpl* web_contents,
26 WebContentsViewDelegate* delegate) {
27 return new WebContentsViewWin(web_contents, delegate);
28 }
29 }
30
24 namespace { 31 namespace {
25 32
26 // We need to have a parent window for the compositing code to work correctly. 33 // We need to have a parent window for the compositing code to work correctly.
27 // 34 //
28 // A tab will not have a parent HWND whenever it is not active in its 35 // A tab will not have a parent HWND whenever it is not active in its
29 // host window - for example at creation time and when it's in the 36 // host window - for example at creation time and when it's in the
30 // background, so we provide a default widget to host them. 37 // background, so we provide a default widget to host them.
31 // 38 //
32 // It may be tempting to use GetDesktopWindow() instead, but this is 39 // It may be tempting to use GetDesktopWindow() instead, but this is
33 // problematic as the shell sends messages to children of the desktop 40 // problematic as the shell sends messages to children of the desktop
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 si.nMin = 1; 487 si.nMin = 1;
481 si.nMax = 100; 488 si.nMax = 100;
482 si.nPage = 10; 489 si.nPage = 10;
483 si.nPos = 50; 490 si.nPos = 50;
484 491
485 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); 492 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE);
486 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); 493 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE);
487 494
488 return 1; 495 return 1;
489 } 496 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698