NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / contents_layout_manager.h
blob40d6440ea5c9262e9b279be0b27af3f43f6a5d8e
1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_LAYOUT_MANAGER_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_LAYOUT_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
11 #include "ui/views/layout/layout_manager.h"
13 // ContentsLayoutManager positions the WebContents and devtools WebContents.
14 class ContentsLayoutManager : public views::LayoutManager {
15 public:
16 ContentsLayoutManager(views::View* devtools_view, views::View* contents_view);
17 virtual ~ContentsLayoutManager();
19 // Sets the active top margin; both devtools_view and contents_view will be
20 // pushed down vertically by |margin|.
21 void SetActiveTopMargin(int margin);
23 // Sets the contents resizing strategy.
24 void SetContentsResizingStrategy(
25 const DevToolsContentsResizingStrategy& strategy);
27 // views::LayoutManager overrides:
28 virtual void Layout(views::View* host) OVERRIDE;
29 virtual gfx::Size GetPreferredSize(views::View* host) OVERRIDE;
30 virtual void Installed(views::View* host) OVERRIDE;
31 virtual void Uninstalled(views::View* host) OVERRIDE;
33 private:
34 views::View* devtools_view_;
35 views::View* contents_view_;
37 views::View* host_;
39 DevToolsContentsResizingStrategy strategy_;
40 int active_top_margin_;
42 DISALLOW_COPY_AND_ASSIGN(ContentsLayoutManager);
45 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_LAYOUT_MANAGER_H_