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

Side by Side Diff: content/browser/tab_contents/tab_contents_view_gtk.cc

Issue 9705053: Remove tab_contents_view_gtk.h include from chrome. I tried to find a way to not have to expose the… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 "content/browser/tab_contents/tab_contents_view_gtk.h" 5 #include "content/browser/tab_contents/tab_contents_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 gtk_widget_set_name(expanded_.get(), "chrome-tab-contents-view"); 87 gtk_widget_set_name(expanded_.get(), "chrome-tab-contents-view");
88 g_signal_connect(expanded_.get(), "size-allocate", 88 g_signal_connect(expanded_.get(), "size-allocate",
89 G_CALLBACK(OnSizeAllocateThunk), this); 89 G_CALLBACK(OnSizeAllocateThunk), this);
90 g_signal_connect(expanded_.get(), "child-size-request", 90 g_signal_connect(expanded_.get(), "child-size-request",
91 G_CALLBACK(OnChildSizeRequestThunk), this); 91 G_CALLBACK(OnChildSizeRequestThunk), this);
92 92
93 gtk_widget_show(expanded_.get()); 93 gtk_widget_show(expanded_.get());
94 drag_source_.reset(new content::WebDragSourceGtk(web_contents)); 94 drag_source_.reset(new content::WebDragSourceGtk(web_contents));
95 95
96 if (delegate_.get()) 96 if (delegate_.get())
97 delegate_->Initialize(expanded_.get()); 97 delegate_->Initialize(expanded_.get(), &focus_store_);
98 } 98 }
99 99
100 TabContentsViewGtk::~TabContentsViewGtk() { 100 TabContentsViewGtk::~TabContentsViewGtk() {
101 expanded_.Destroy(); 101 expanded_.Destroy();
102 } 102 }
103 103
104 void TabContentsViewGtk::CreateView(const gfx::Size& initial_size) { 104 void TabContentsViewGtk::CreateView(const gfx::Size& initial_size) {
105 requested_size_ = initial_size; 105 requested_size_ = initial_size;
106 } 106 }
107 107
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 GdkWindow* window = gtk_widget_get_window(GetNativeView()); 250 GdkWindow* window = gtk_widget_get_window(GetNativeView());
251 if (!window) { 251 if (!window) {
252 out->SetRect(0, 0, requested_size_.width(), requested_size_.height()); 252 out->SetRect(0, 0, requested_size_.width(), requested_size_.height());
253 return; 253 return;
254 } 254 }
255 int x = 0, y = 0, w, h; 255 int x = 0, y = 0, w, h;
256 gdk_window_get_geometry(window, &x, &y, &w, &h, NULL); 256 gdk_window_get_geometry(window, &x, &y, &w, &h, NULL);
257 out->SetRect(x, y, w, h); 257 out->SetRect(x, y, w, h);
258 } 258 }
259 259
260 void TabContentsViewGtk::SetFocusedWidget(GtkWidget* widget) {
261 focus_store_.SetWidget(widget);
262 }
263
264 WebContents* TabContentsViewGtk::web_contents() { 260 WebContents* TabContentsViewGtk::web_contents() {
265 return tab_contents_; 261 return tab_contents_;
266 } 262 }
267 263
268 void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) { 264 void TabContentsViewGtk::UpdateDragCursor(WebDragOperation operation) {
269 drag_dest_->UpdateDragStatus(operation); 265 drag_dest_->UpdateDragStatus(operation);
270 } 266 }
271 267
272 void TabContentsViewGtk::GotFocus() { 268 void TabContentsViewGtk::GotFocus() {
273 // This is only used in the views FocusManager stuff but it bleeds through 269 // This is only used in the views FocusManager stuff but it bleeds through
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // We manually tell our RWHV to resize the renderer content. This avoids 421 // We manually tell our RWHV to resize the renderer content. This avoids
426 // spurious resizes from GTK+. 422 // spurious resizes from GTK+.
427 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); 423 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView();
428 if (rwhv) 424 if (rwhv)
429 rwhv->SetSize(size); 425 rwhv->SetSize(size);
430 if (tab_contents_->GetInterstitialPage()) 426 if (tab_contents_->GetInterstitialPage())
431 tab_contents_->GetInterstitialPage()->SetSize(size); 427 tab_contents_->GetInterstitialPage()->SetSize(size);
432 } 428 }
433 429
434 } // namespace content 430 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_view_gtk.h ('k') | content/public/browser/web_contents_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698