| 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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/aura/window_delegate.h" | 8 #include "ui/aura/window_delegate.h" |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/size.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const gfx::Point& location) OVERRIDE; | 35 const gfx::Point& location) OVERRIDE; |
| 36 virtual bool CanFocus() OVERRIDE; | 36 virtual bool CanFocus() OVERRIDE; |
| 37 virtual void OnCaptureLost() OVERRIDE; | 37 virtual void OnCaptureLost() OVERRIDE; |
| 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 39 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 39 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 40 virtual void OnWindowDestroying() OVERRIDE; | 40 virtual void OnWindowDestroying() OVERRIDE; |
| 41 virtual void OnWindowDestroyed() OVERRIDE; | 41 virtual void OnWindowDestroyed() OVERRIDE; |
| 42 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; | 42 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; |
| 43 virtual bool HasHitTestMask() const OVERRIDE; | 43 virtual bool HasHitTestMask() const OVERRIDE; |
| 44 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; | 44 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; |
| 45 virtual scoped_refptr<ui::Texture> CopyTexture() OVERRIDE; | 45 virtual void DidRecreateLayer(ui::Layer* old_layer, |
| 46 ui::Layer* new_layer) OVERRIDE; |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 gfx::Image image_; | 49 gfx::Image image_; |
| 49 gfx::Size window_size_; | 50 gfx::Size window_size_; |
| 50 | 51 |
| 51 // Keeps track of whether the window size matches the image size or not. If | 52 // Keeps track of whether the window size matches the image size or not. If |
| 52 // the image size is smaller than the window size, then the delegate paints a | 53 // the image size is smaller than the window size, then the delegate paints a |
| 53 // white background for the missing regions. | 54 // white background for the missing regions. |
| 54 bool size_mismatch_; | 55 bool size_mismatch_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(ImageWindowDelegate); | 57 DISALLOW_COPY_AND_ASSIGN(ImageWindowDelegate); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace content | 60 } // namespace content |
| 60 | 61 |
| 61 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ | 62 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_ |
| OLD | NEW |