OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/web_contents/aura/image_window_delegate.h" | 5 #include "content/browser/web_contents/aura/image_window_delegate.h" |
6 | 6 |
7 #include "ui/base/cursor/cursor.h" | 7 #include "ui/base/cursor/cursor.h" |
8 #include "ui/base/hit_test.h" | 8 #include "ui/base/hit_test.h" |
9 #include "ui/compositor/compositor.h" | 9 #include "ui/compositor/compositor.h" |
10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 | 59 |
60 bool ImageWindowDelegate::CanFocus() { | 60 bool ImageWindowDelegate::CanFocus() { |
61 return false; | 61 return false; |
62 } | 62 } |
63 | 63 |
64 void ImageWindowDelegate::OnCaptureLost() { | 64 void ImageWindowDelegate::OnCaptureLost() { |
65 } | 65 } |
66 | 66 |
67 void ImageWindowDelegate::OnPaint(gfx::Canvas* canvas) { | 67 void ImageWindowDelegate::OnPaint(gfx::Canvas* canvas) { |
68 if (image_.IsEmpty()) { | 68 if (image_.IsEmpty()) { |
69 canvas->DrawColor(SK_ColorGRAY); | 69 canvas->DrawColor(SK_ColorWHITE); |
sky
2014/07/25 22:08:06
Why are we changing colors?
mfomitchev
2014/07/25 22:29:15
Kuscher asked for this. Testing it out, I agree wi
sky
2014/07/25 22:44:49
Won't this impact *all* sites though? And won't it
mfomitchev
2014/07/25 23:09:58
Yes it would. I think it would look better for any
| |
70 } else { | 70 } else { |
71 if (size_mismatch_) | 71 if (size_mismatch_) |
72 canvas->DrawColor(SK_ColorWHITE); | 72 canvas->DrawColor(SK_ColorWHITE); |
73 canvas->DrawImageInt(image_.AsImageSkia(), 0, 0); | 73 canvas->DrawImageInt(image_.AsImageSkia(), 0, 0); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 void ImageWindowDelegate::OnDeviceScaleFactorChanged(float scale_factor) { | 77 void ImageWindowDelegate::OnDeviceScaleFactorChanged(float scale_factor) { |
78 } | 78 } |
79 | 79 |
80 void ImageWindowDelegate::OnWindowDestroying(aura::Window* window) { | 80 void ImageWindowDelegate::OnWindowDestroying(aura::Window* window) { |
81 } | 81 } |
82 | 82 |
83 void ImageWindowDelegate::OnWindowDestroyed(aura::Window* window) { | 83 void ImageWindowDelegate::OnWindowDestroyed(aura::Window* window) { |
84 delete this; | 84 delete this; |
85 } | 85 } |
86 | 86 |
87 void ImageWindowDelegate::OnWindowTargetVisibilityChanged(bool visible) { | 87 void ImageWindowDelegate::OnWindowTargetVisibilityChanged(bool visible) { |
88 } | 88 } |
89 | 89 |
90 bool ImageWindowDelegate::HasHitTestMask() const { | 90 bool ImageWindowDelegate::HasHitTestMask() const { |
91 return false; | 91 return false; |
92 } | 92 } |
93 | 93 |
94 void ImageWindowDelegate::GetHitTestMask(gfx::Path* mask) const { | 94 void ImageWindowDelegate::GetHitTestMask(gfx::Path* mask) const { |
95 } | 95 } |
96 | 96 |
97 } // namespace content | 97 } // namespace content |
OLD | NEW |