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

Side by Side Diff: chrome/browser/tab_contents/web_contents_view.h

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
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 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/gfx/native_widget_types.h" 12 #include "base/gfx/native_widget_types.h"
13 #include "base/gfx/rect.h" 13 #include "base/gfx/rect.h"
14 #include "base/gfx/size.h" 14 #include "base/gfx/size.h"
15 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 15 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
16 16
17 class Browser; 17 class Browser;
18 class RenderViewHost; 18 class RenderViewHost;
19 class RenderWidgetHost; 19 class RenderWidgetHost;
20 class RenderWidgetHostView; 20 class RenderWidgetHostView;
21 class RenderWidgetHostViewWin; // TODO(brettw) this should not be necessary.
22 class WebContents; 21 class WebContents;
23 struct WebDropData; 22 struct WebDropData;
24 class WebKeyboardEvent; 23 class WebKeyboardEvent;
25 24
26 namespace base { 25 namespace base {
27 class WaitableEvent; 26 class WaitableEvent;
28 } 27 }
29 28
30 // The WebContentsView is an interface that is implemented by the platform- 29 // The WebContentsView is an interface that is implemented by the platform-
31 // dependent web contents views. The WebContents uses this interface to talk to 30 // dependent web contents views. The WebContents uses this interface to talk to
32 // them. View-related messages will also get forwarded directly to this class 31 // them. View-related messages will also get forwarded directly to this class
33 // from RenderViewHost via RenderViewHostDelegate::View. 32 // from RenderViewHost via RenderViewHostDelegate::View.
34 // 33 //
35 // It contains a small amount of logic with respect to creating new sub-view 34 // It contains a small amount of logic with respect to creating new sub-view
36 // that should be the same for all platforms. 35 // that should be the same for all platforms.
37 class WebContentsView : public RenderViewHostDelegate::View { 36 class WebContentsView : public RenderViewHostDelegate::View {
38 public: 37 public:
39 virtual ~WebContentsView() {} 38 virtual ~WebContentsView() {}
40 39
41 virtual WebContents* GetWebContents() = 0; 40 virtual WebContents* GetWebContents() = 0;
42 41
43 virtual void CreateView() = 0; 42 virtual void CreateView() = 0;
44 43
45 // Sets up the View that holds the rendered web page, receives messages for 44 // Sets up the View that holds the rendered web page, receives messages for
46 // it and contains page plugins. 45 // it and contains page plugins. The host view should be sized to the current
47 // TODO(brettw) make this so we don't need to return the Win version (see the 46 // size of the WebContents.
48 // caller in WebContents). 47 virtual RenderWidgetHostView* CreateViewForWidget(
49 virtual RenderWidgetHostViewWin* CreateViewForWidget(
50 RenderWidgetHost* render_widget_host) = 0; 48 RenderWidgetHost* render_widget_host) = 0;
51 49
52 // Returns the native widget that contains the contents of the tab. 50 // Returns the native widget that contains the contents of the tab.
53 virtual gfx::NativeView GetNativeView() const = 0; 51 virtual gfx::NativeView GetNativeView() const = 0;
54 52
55 // Returns the native widget with the main content of the tab (i.e. the main 53 // Returns the native widget with the main content of the tab (i.e. the main
56 // render view host, though there may be many popups in the tab as children of 54 // render view host, though there may be many popups in the tab as children of
57 // the container). 55 // the container).
58 virtual gfx::NativeView GetContentNativeView() const = 0; 56 virtual gfx::NativeView GetContentNativeView() const = 0;
59 57
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 187
190 // These maps hold on to the widgets that we created on behalf of the 188 // These maps hold on to the widgets that we created on behalf of the
191 // renderer that haven't shown yet. 189 // renderer that haven't shown yet.
192 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; 190 typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews;
193 PendingWidgetViews pending_widget_views_; 191 PendingWidgetViews pending_widget_views_;
194 192
195 DISALLOW_COPY_AND_ASSIGN(WebContentsView); 193 DISALLOW_COPY_AND_ASSIGN(WebContentsView);
196 }; 194 };
197 195
198 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_ 196 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_contents.cc ('k') | chrome/browser/tab_contents/web_contents_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698