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

Unified Diff: extensions/browser/app_window/size_constraints.h

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 3 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
Index: extensions/browser/app_window/size_constraints.h
diff --git a/extensions/browser/app_window/size_constraints.h b/extensions/browser/app_window/size_constraints.h
deleted file mode 100644
index ecacf1e5eb13ee5e848cb49fccded4458f3ff9db..0000000000000000000000000000000000000000
--- a/extensions/browser/app_window/size_constraints.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 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 EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_
-#define EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_
-
-#include "ui/gfx/geometry/size.h"
-
-namespace gfx {
-class Insets;
-}
-
-namespace extensions {
-
-class SizeConstraints {
- public:
- // The value SizeConstraints uses to represent an unbounded width or height.
- // This is an enum so that it can be declared inline here.
- enum { kUnboundedSize = 0 };
-
- SizeConstraints();
- SizeConstraints(const gfx::Size& min_size, const gfx::Size& max_size);
- ~SizeConstraints();
-
- // Adds frame insets to a size constraint.
- static gfx::Size AddFrameToConstraints(const gfx::Size& size_constraints,
- const gfx::Insets& frame_insets);
-
- // Returns the bounds with its size clamped to the min/max size.
- gfx::Size ClampSize(gfx::Size size) const;
-
- // When gfx::Size is used as a min/max size, a zero represents an unbounded
- // component. This method checks whether either component is specified.
- // Note we can't use gfx::Size::IsEmpty as it returns true if either width
- // or height is zero.
- bool HasMinimumSize() const;
- bool HasMaximumSize() const;
-
- // This returns true if all components are specified, and min and max are
- // equal.
- bool HasFixedSize() const;
-
- gfx::Size GetMaximumSize() const;
- gfx::Size GetMinimumSize() const;
-
- void set_minimum_size(const gfx::Size& min_size);
- void set_maximum_size(const gfx::Size& max_size);
-
- private:
- gfx::Size minimum_size_;
- gfx::Size maximum_size_;
-};
-
-} // namespace extensions
-
-#endif // EXTENSIONS_BROWSER_APP_WINDOW_SIZE_CONSTRAINTS_H_
« no previous file with comments | « extensions/browser/app_window/native_app_window.h ('k') | extensions/browser/app_window/size_constraints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698