| 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_view.h" | 5 #include "views/desktop/desktop_window_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "ui/gfx/canvas.h" | 8 #include "ui/gfx/canvas.h" |
| 9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
| 10 #include "views/desktop/desktop_background.h" | 10 #include "views/desktop/desktop_background.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 public: | 65 public: |
| 66 TestWindowContentView(const string16& title, SkColor color) | 66 TestWindowContentView(const string16& title, SkColor color) |
| 67 : title_(title), | 67 : title_(title), |
| 68 color_(color) { | 68 color_(color) { |
| 69 } | 69 } |
| 70 virtual ~TestWindowContentView() {} | 70 virtual ~TestWindowContentView() {} |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 // Overridden from View: | 73 // Overridden from View: |
| 74 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 74 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { |
| 75 canvas->FillRectInt(color_, 0, 0, width(), height()); | 75 canvas->FillRect(color_, GetLocalBounds()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Overridden from WindowDelegate: | 78 // Overridden from WindowDelegate: |
| 79 virtual string16 GetWindowTitle() const OVERRIDE { | 79 virtual string16 GetWindowTitle() const OVERRIDE { |
| 80 return title_; | 80 return title_; |
| 81 } | 81 } |
| 82 virtual View* GetContentsView() { | 82 virtual View* GetContentsView() { |
| 83 return this; | 83 return this; |
| 84 } | 84 } |
| 85 virtual bool CanMaximize() const OVERRIDE { | 85 virtual bool CanMaximize() const OVERRIDE { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 return NULL; | 255 return NULL; |
| 256 | 256 |
| 257 case DESKTOP_OTHER: | 257 case DESKTOP_OTHER: |
| 258 return new NativeFrameView(widget_); | 258 return new NativeFrameView(widget_); |
| 259 } | 259 } |
| 260 return NULL; | 260 return NULL; |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace desktop | 263 } // namespace desktop |
| 264 } // namespace views | 264 } // namespace views |
| OLD | NEW |