| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(USE_X11) | 5 #if defined(USE_X11) |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 virtual ~ColoredLayer() {} | 60 virtual ~ColoredLayer() {} |
| 61 | 61 |
| 62 // Overridden from LayerDelegate: | 62 // Overridden from LayerDelegate: |
| 63 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { | 63 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE { |
| 64 if (draw_) { | 64 if (draw_) { |
| 65 canvas->DrawColor(color_); | 65 canvas->DrawColor(color_); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 virtual void OnDelegatedFrameDamage( |
| 70 const gfx::Rect& damage_rect_in_dip) OVERRIDE {} |
| 71 |
| 69 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE { | 72 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE { |
| 70 } | 73 } |
| 71 | 74 |
| 72 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { | 75 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { |
| 73 return base::Closure(); | 76 return base::Closure(); |
| 74 } | 77 } |
| 75 | 78 |
| 76 void set_color(SkColor color) { color_ = color; } | 79 void set_color(SkColor color) { color_ = color; } |
| 77 void set_draw(bool draw) { draw_ = draw; } | 80 void set_draw(bool draw) { draw_ = draw; } |
| 78 | 81 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); | 364 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); |
| 362 #endif | 365 #endif |
| 363 | 366 |
| 364 host->Show(); | 367 host->Show(); |
| 365 base::MessageLoopForUI::current()->Run(); | 368 base::MessageLoopForUI::current()->Run(); |
| 366 focus_client.reset(); | 369 focus_client.reset(); |
| 367 host.reset(); | 370 host.reset(); |
| 368 | 371 |
| 369 return 0; | 372 return 0; |
| 370 } | 373 } |
| OLD | NEW |