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

Side by Side Diff: content/browser/web_contents/web_contents_view_gtk.h

Issue 10038026: TabContents -> WebContentsImpl, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: *web*contents Created 8 years, 8 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "content/browser/web_contents/web_contents_view_helper.h" 14 #include "content/browser/web_contents/web_contents_view_helper.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/public/browser/web_contents_view.h" 16 #include "content/public/browser/web_contents_view.h"
17 #include "ui/base/gtk/focus_store_gtk.h" 17 #include "ui/base/gtk/focus_store_gtk.h"
18 #include "ui/base/gtk/gtk_signal.h" 18 #include "ui/base/gtk/gtk_signal.h"
19 #include "ui/base/gtk/owned_widget_gtk.h" 19 #include "ui/base/gtk/owned_widget_gtk.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 class WebContentsViewDelegate; 23 class WebContentsViewDelegate;
24 class WebDragDestDelegate; 24 class WebDragDestDelegate;
25 class WebDragDestGtk; 25 class WebDragDestGtk;
26 class WebDragSourceGtk; 26 class WebDragSourceGtk;
27 27
28 class CONTENT_EXPORT WebContentsViewGtk : public WebContentsView { 28 class CONTENT_EXPORT WebContentsViewGtk : public WebContentsView {
29 public: 29 public:
30 // The corresponding TabContents is passed in the constructor, and manages 30 // The corresponding WebContentsImpl is passed in the constructor, and manages
31 // our lifetime. This doesn't need to be the case, but is this way currently 31 // our lifetime. This doesn't need to be the case, but is this way currently
32 // because that's what was easiest when they were split. We optionally take 32 // because that's what was easiest when they were split. We optionally take
33 // |wrapper| which creates an intermediary widget layer for features from the 33 // |wrapper| which creates an intermediary widget layer for features from the
34 // Embedding layer that lives with the WebContentsView. 34 // Embedding layer that lives with the WebContentsView.
35 WebContentsViewGtk(WebContentsImpl* web_contents, 35 WebContentsViewGtk(WebContentsImpl* web_contents,
36 WebContentsViewDelegate* delegate); 36 WebContentsViewDelegate* delegate);
37 virtual ~WebContentsViewGtk(); 37 virtual ~WebContentsViewGtk();
38 38
39 WebContentsViewDelegate* delegate() const { return delegate_.get(); } 39 WebContentsViewDelegate* delegate() const { return delegate_.get(); }
40 WebContents* web_contents(); 40 WebContents* web_contents();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // changed. 109 // changed.
110 CHROMEGTK_CALLBACK_2(WebContentsViewGtk, void, OnChildSizeRequest, 110 CHROMEGTK_CALLBACK_2(WebContentsViewGtk, void, OnChildSizeRequest,
111 GtkWidget*, GtkRequisition*); 111 GtkWidget*, GtkRequisition*);
112 112
113 // Used to propagate the size change of |expanded_| to our RWHV to resize the 113 // Used to propagate the size change of |expanded_| to our RWHV to resize the
114 // renderer content. 114 // renderer content.
115 CHROMEGTK_CALLBACK_1(WebContentsViewGtk, void, OnSizeAllocate, 115 CHROMEGTK_CALLBACK_1(WebContentsViewGtk, void, OnSizeAllocate,
116 GtkAllocation*); 116 GtkAllocation*);
117 117
118 // The WebContentsImpl whose contents we display. 118 // The WebContentsImpl whose contents we display.
119 WebContentsImpl* tab_contents_; 119 WebContentsImpl* web_contents_;
120 120
121 // Common implementations of some WebContentsView methods. 121 // Common implementations of some WebContentsView methods.
122 WebContentsViewHelper web_contents_view_helper_; 122 WebContentsViewHelper web_contents_view_helper_;
123 123
124 // This container holds the tab's web page views. It is a GtkExpandedContainer 124 // This container holds the tab's web page views. It is a GtkExpandedContainer
125 // so that we can control the size of the web pages. 125 // so that we can control the size of the web pages.
126 ui::OwnedWidgetGtk expanded_; 126 ui::OwnedWidgetGtk expanded_;
127 127
128 ui::FocusStoreGtk focus_store_; 128 ui::FocusStoreGtk focus_store_;
129 129
(...skipping 12 matching lines...) Expand all
142 // The size we want the tab contents view to be. We keep this in a separate 142 // The size we want the tab contents view to be. We keep this in a separate
143 // variable because resizing in GTK+ is async. 143 // variable because resizing in GTK+ is async.
144 gfx::Size requested_size_; 144 gfx::Size requested_size_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGtk); 146 DISALLOW_COPY_AND_ASSIGN(WebContentsViewGtk);
147 }; 147 };
148 148
149 } // namespace content 149 } // namespace content
150 150
151 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_ 151 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/browser/web_contents/web_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698