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

Unified Diff: views/desktop/desktop_window.cc

Issue 7206055: Add an option to run Chrome in the views desktop. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/desktop/desktop_window.h ('k') | views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/desktop/desktop_window.cc
===================================================================
--- views/desktop/desktop_window.cc (revision 89890)
+++ views/desktop/desktop_window.cc (working copy)
@@ -109,11 +109,6 @@
params.bounds = gfx::Rect(20, 20, 1920, 1200);
window->Init(params);
window->Show();
-
- desktop_window->CreateTestWindow(L"Sample Window 1", SK_ColorWHITE,
- gfx::Rect(500, 200, 400, 400), true);
- desktop_window->CreateTestWindow(L"Sample Window 2", SK_ColorRED,
- gfx::Rect(600, 450, 450, 300), false);
}
void DesktopWindow::ActivateWidget(Widget* widget) {
@@ -129,6 +124,25 @@
}
}
+
+void DesktopWindow::CreateTestWindow(const std::wstring& title,
+ SkColor color,
+ gfx::Rect initial_bounds,
+ bool rotate) {
+ views::Widget* window = views::Widget::CreateWindowWithBounds(
+ new TestWindowContentView(title, color),
+ initial_bounds);
+ window->Show();
+
+ if (rotate) {
+ ui::Transform transform;
+ transform.SetRotate(90.0f);
+ transform.SetTranslateX(window->GetWindowScreenBounds().width());
+ static_cast<NativeWidgetViews*>(window->native_widget())->GetView()->
+ SetTransform(transform);
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// DesktopWindow, View overrides:
@@ -170,26 +184,5 @@
return this;
}
-////////////////////////////////////////////////////////////////////////////////
-// DesktopWindow, private:
-
-void DesktopWindow::CreateTestWindow(const std::wstring& title,
- SkColor color,
- gfx::Rect initial_bounds,
- bool rotate) {
- views::Widget* window = views::Widget::CreateWindowWithBounds(
- new TestWindowContentView(title, color),
- initial_bounds);
- window->Show();
-
- if (rotate) {
- ui::Transform transform;
- transform.SetRotate(90.0f);
- transform.SetTranslateX(window->GetWindowScreenBounds().width());
- static_cast<NativeWidgetViews*>(window->native_widget())->GetView()->
- SetTransform(transform);
- }
-}
-
} // namespace desktop
} // namespace views
« no previous file with comments | « views/desktop/desktop_window.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698