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