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

Side by Side Diff: apps/ui/web_contents_sizer.cc

Issue 232773008: More removal of GTK code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base/ so I don't need another stamp. Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "apps/ui/web_contents_sizer.h" 5 #include "apps/ui/web_contents_sizer.h"
6 6
7 #include "content/public/browser/web_contents.h" 7 #include "content/public/browser/web_contents.h"
8 #include "content/public/browser/web_contents_view.h" 8 #include "content/public/browser/web_contents_view.h"
9 9
10 #if defined(USE_AURA) 10 #if defined(USE_AURA)
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #elif defined(TOOLKIT_GTK)
13 #include <gtk/gtk.h>
14 #elif defined(OS_ANDROID) 12 #elif defined(OS_ANDROID)
15 #include "content/public/browser/render_widget_host_view.h" 13 #include "content/public/browser/render_widget_host_view.h"
16 #endif 14 #endif
17 15
18 namespace apps { 16 namespace apps {
19 17
20 void ResizeWebContents(content::WebContents* web_contents, 18 void ResizeWebContents(content::WebContents* web_contents,
21 const gfx::Size& new_size) { 19 const gfx::Size& new_size) {
22 #if defined(USE_AURA) 20 #if defined(USE_AURA)
23 aura::Window* window = web_contents->GetView()->GetNativeView(); 21 aura::Window* window = web_contents->GetView()->GetNativeView();
24 window->SetBounds(gfx::Rect(window->bounds().origin(), new_size)); 22 window->SetBounds(gfx::Rect(window->bounds().origin(), new_size));
25 #elif defined(TOOLKIT_GTK)
26 GtkWidget* widget = web_contents->GetView()->GetNativeView();
27 gtk_widget_set_size_request(widget, new_size.width(), new_size.height());
28 #elif defined(OS_ANDROID) 23 #elif defined(OS_ANDROID)
29 content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView(); 24 content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView();
30 if (view) 25 if (view)
31 view->SetSize(new_size); 26 view->SetSize(new_size);
32 #endif 27 #endif
33 } 28 }
34 29
35 } // namespace apps 30 } // namespace apps
OLDNEW
« no previous file with comments | « apps/app_window_browsertest.cc ('k') | chrome/browser/background/background_contents_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698