Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: content/browser/web_contents/aura/image_window_delegate.h

Issue 880703002: Move ImageWindowDelegate to ui/aura_extra (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated a comment Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/web_contents/aura/image_window_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/aura/image_window_delegate.h
diff --git a/content/browser/web_contents/aura/image_window_delegate.h b/content/browser/web_contents/aura/image_window_delegate.h
deleted file mode 100644
index a36110d40c25501d56c26122d1194eba5187f4c4..0000000000000000000000000000000000000000
--- a/content/browser/web_contents/aura/image_window_delegate.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_
-#define CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_
-
-#include "content/common/content_export.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/gfx/geometry/size.h"
-#include "ui/gfx/image/image.h"
-
-namespace content {
-
-// An ImageWindowDelegate paints an image for a Window. The delegate destroys
-// itself when the Window is destroyed. The delegate does not consume any event.
-class CONTENT_EXPORT ImageWindowDelegate : public aura::WindowDelegate {
- public:
- ImageWindowDelegate();
-
- void SetImage(const gfx::Image& image);
- bool has_image() const { return !image_.IsEmpty(); }
-
- protected:
- ~ImageWindowDelegate() override;
-
- // Overridden from aura::WindowDelegate:
- gfx::Size GetMinimumSize() const override;
- gfx::Size GetMaximumSize() const override;
- void OnBoundsChanged(const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) override;
- gfx::NativeCursor GetCursor(const gfx::Point& point) override;
- int GetNonClientComponent(const gfx::Point& point) const override;
- bool ShouldDescendIntoChildForEventHandling(
- aura::Window* child,
- const gfx::Point& location) override;
- bool CanFocus() override;
- void OnCaptureLost() override;
- void OnPaint(gfx::Canvas* canvas) override;
- void OnDeviceScaleFactorChanged(float device_scale_factor) override;
- void OnWindowDestroying(aura::Window* window) override;
- void OnWindowDestroyed(aura::Window* window) override;
- void OnWindowTargetVisibilityChanged(bool visible) override;
- bool HasHitTestMask() const override;
- void GetHitTestMask(gfx::Path* mask) const override;
-
- protected:
- gfx::Image image_;
- gfx::Size window_size_;
-
- // Keeps track of whether the window size matches the image size or not. If
- // the image size is smaller than the window size, then the delegate paints a
- // white background for the missing regions.
- bool size_mismatch_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageWindowDelegate);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_IMAGE_WINDOW_DELEGATE_H_
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/web_contents/aura/image_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698