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

Side by Side Diff: chrome/browser/devtools/devtools_contents_resizing_strategy.h

Issue 137483007: [DevTools] Use special resizing strategy instead of insets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments Created 6 years, 10 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 unified diff | Download patch
OLDNEW
(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 // This class knows how to resize both DevTools and inspected WebContents
14 // inside a browser window hierarchy.
15 class DevToolsContentsResizingStrategy {
16 public:
17 DevToolsContentsResizingStrategy();
18 DevToolsContentsResizingStrategy(
19 const gfx::Insets& insets,
20 const gfx::Size& min_size);
21
22 void CopyFrom(const DevToolsContentsResizingStrategy& strategy);
23 bool Equals(const DevToolsContentsResizingStrategy& strategy);
24
25 const gfx::Insets& insets() const { return insets_; }
26 const gfx::Size& min_size() const { return min_size_; }
27
28 private:
29 // Insets of contents inside DevTools.
30 gfx::Insets insets_;
31
32 // Minimum size of contents.
33 gfx::Size min_size_;
34
35 DISALLOW_COPY_AND_ASSIGN(DevToolsContentsResizingStrategy);
36 };
37
38 void ApplyDevToolsContentsResizingStrategy(
sky 2014/02/04 15:12:17 Add description.
dgozman 2014/02/04 15:29:01 Done.
39 const DevToolsContentsResizingStrategy& strategy,
40 const gfx::Size& container_size,
41 const gfx::Rect& old_devtools_bounds,
42 const gfx::Rect& old_contents_bounds,
43 gfx::Rect* new_devtools_bounds,
44 gfx::Rect* new_contents_bounds);
45
46 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_CONTENTS_RESIZING_STRATEGY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698