OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 // Overridden from Widget: | 32 // Overridden from Widget: |
33 virtual internal::RootView* CreateRootView() OVERRIDE { | 33 virtual internal::RootView* CreateRootView() OVERRIDE { |
34 return new DesktopWindowRootView(desktop_window_, this); | 34 return new DesktopWindowRootView(desktop_window_, this); |
35 } | 35 } |
36 | 36 |
37 DesktopWindow* desktop_window_; | 37 DesktopWindow* desktop_window_; |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(DesktopWindowWindow); | 39 DISALLOW_COPY_AND_ASSIGN(DesktopWindowWindow); |
40 }; | 40 }; |
41 | 41 |
42 class TestWindowContentView : public View, | 42 class TestWindowContentView : public WidgetDelegateView { |
43 public WidgetDelegate { | |
44 public: | 43 public: |
45 TestWindowContentView(const std::wstring& title, SkColor color) | 44 TestWindowContentView(const std::wstring& title, SkColor color) |
46 : title_(title), | 45 : title_(title), |
47 color_(color) { | 46 color_(color) { |
48 } | 47 } |
49 virtual ~TestWindowContentView() {} | 48 virtual ~TestWindowContentView() {} |
50 | 49 |
51 private: | 50 private: |
52 // Overridden from View: | 51 // Overridden from View: |
53 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 52 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if (rotate) { | 173 if (rotate) { |
175 ui::Transform transform; | 174 ui::Transform transform; |
176 transform.SetRotate(90.0f); | 175 transform.SetRotate(90.0f); |
177 transform.SetTranslateX(window->GetWindowScreenBounds().width()); | 176 transform.SetTranslateX(window->GetWindowScreenBounds().width()); |
178 nwv->GetView()->SetTransform(transform); | 177 nwv->GetView()->SetTransform(transform); |
179 } | 178 } |
180 } | 179 } |
181 | 180 |
182 } // namespace desktop | 181 } // namespace desktop |
183 } // namespace views | 182 } // namespace views |
OLD | NEW |