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

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

Issue 209023003: Remove references to WebContentsView::SizeContents from chrome/ and app/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clang-format 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
« no previous file with comments | « ui/base/web_contents_sizer.h ('k') | ui/base/web_contents_sizer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/base/web_contents_sizer.h"
6
7 #include "content/public/browser/web_contents.h"
8 #include "content/public/browser/web_contents_view.h"
9
10 #if defined(USE_AURA)
11 #include "ui/aura/window.h"
12 #elif defined(TOOLKIT_GTK)
13 #include <gtk/gtk.h>
14 #elif defined(OS_ANDROID)
sky 2014/04/03 15:05:51 Why the empty elif?
15 #endif
16
17 namespace ui {
18
19 void ResizeWebContents(content::WebContents* web_contents,
20 const gfx::Size& new_size) {
21 #if defined(USE_AURA)
22 gfx::NativeView view = web_contents->GetView()->GetNativeView();
sky 2014/04/03 15:05:51 gfx::NativeView->aura::Window
23 gfx::Rect rect = view->bounds();
24 rect.set_size(new_size);
25 view->SetBounds(rect);
sky 2014/04/03 15:05:51 window->SetBounds(gfx::Rect(window->bounds().size(
26 #elif defined(TOOLKIT_GTK)
27 gfx::NativeView view = web_contents->GetView()->GetNativeView();
28 gtk_widget_set_size_request(view, new_size.width(), new_size.height());
29 #elif defined(OS_ANDROID)
30 content::RenderWidgetHostView* view = web_contents->GetRenderWidgetHostView();
31 view->SetSize(new_size);
32 #endif
33 }
34
35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/web_contents_sizer.h ('k') | ui/base/web_contents_sizer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698