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

Side by Side Diff: views/desktop/desktop_window.cc

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « views/controls/button/button_dropdown.cc ('k') | views/mouse_watcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/desktop/desktop_window.h" 5 #include "views/desktop/desktop_window.h"
6 6
7 #include "ui/gfx/canvas.h" 7 #include "ui/gfx/canvas.h"
8 #include "ui/gfx/transform.h" 8 #include "ui/gfx/transform.h"
9 #include "views/desktop/desktop_background.h" 9 #include "views/desktop/desktop_background.h"
10 #include "views/desktop/desktop_window_root_view.h" 10 #include "views/desktop/desktop_window_root_view.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 views::NativeWindowViews* nwv = new views::NativeWindowViews(this, window); 165 views::NativeWindowViews* nwv = new views::NativeWindowViews(this, window);
166 views::Window::InitParams params(new TestWindowContentView(title, color)); 166 views::Window::InitParams params(new TestWindowContentView(title, color));
167 params.native_window = nwv; 167 params.native_window = nwv;
168 params.widget_init_params.bounds = initial_bounds; 168 params.widget_init_params.bounds = initial_bounds;
169 window->InitWindow(params); 169 window->InitWindow(params);
170 window->Show(); 170 window->Show();
171 171
172 if (rotate) { 172 if (rotate) {
173 ui::Transform transform; 173 ui::Transform transform;
174 transform.SetRotate(90.0f); 174 transform.SetRotate(90.0f);
175 transform.SetTranslateX(window->GetBounds().width()); 175 transform.SetTranslateX(window->GetWindowScreenBounds().width());
176 nwv->GetView()->SetTransform(transform); 176 nwv->GetView()->SetTransform(transform);
177 } 177 }
178 } 178 }
179 179
180 } // namespace desktop 180 } // namespace desktop
181 } // namespace views 181 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/button/button_dropdown.cc ('k') | views/mouse_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698