Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_CONTENTS_RESIZING_STRATEGY_H_ | |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_CONTENTS_RESIZING_STRATEGY_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "ui/gfx/insets.h" | |
| 10 #include "ui/gfx/rect.h" | |
| 11 #include "ui/gfx/size.h" | |
| 12 | |
| 13 class DevToolsContentsResizingStrategy { | |
| 14 public: | |
| 15 DevToolsContentsResizingStrategy(); | |
| 16 DevToolsContentsResizingStrategy(gfx::Insets insets, gfx::Size min_size); | |
| 17 | |
| 18 const gfx::Insets& insets() const { return insets_; } | |
| 19 const gfx::Size& min_size() const { return min_size_; } | |
| 20 | |
| 21 void Apply( | |
| 22 const gfx::Size& container_size, | |
| 23 const gfx::Rect& old_devtools_bounds, | |
| 24 const gfx::Rect& old_contents_bounds, | |
| 25 gfx::Rect* new_devtools_bounds, | |
| 26 gfx::Rect* new_contents_bounds); | |
| 27 | |
| 28 private: | |
| 29 // Insets of contents inside DevTools. | |
|
pfeldman
2014/01/31 15:08:28
Blank line above comments.
dgozman
2014/02/01 13:21:35
Done.
| |
| 30 gfx::Insets insets_; | |
| 31 | |
| 32 // Minimum size of contents. | |
| 33 gfx::Size min_size_; | |
|
pfeldman
2014/01/31 15:08:28
DISALLOW_COPY_AND_ASSIGN is missing
dgozman
2014/02/01 13:21:35
This is data-holding class intended to be copied a
| |
| 34 }; | |
| 35 | |
| 36 inline bool operator==(const DevToolsContentsResizingStrategy& lhs, | |
| 37 const DevToolsContentsResizingStrategy& rhs) { | |
| 38 return lhs.insets() == rhs.insets() && lhs.min_size() == rhs.min_size(); | |
| 39 } | |
| 40 | |
| 41 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_CONTENTS_RESIZING_STRATEGY_H_ | |
| OLD | NEW |