Chromium Code Reviews| Index: chrome/browser/chromeos/webui/login/browser/dom_browser_view_layout.h |
| diff --git a/chrome/browser/chromeos/webui/login/browser/dom_browser_view_layout.h b/chrome/browser/chromeos/webui/login/browser/dom_browser_view_layout.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..16f62ffb9a8da820a8d5b6b50128959907475de7 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/webui/login/browser/dom_browser_view_layout.h |
| @@ -0,0 +1,77 @@ |
| +// Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_BROWSER_DOM_BROWSER_VIEW_LAYOUT_H_ |
| +#define CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_BROWSER_DOM_BROWSER_VIEW_LAYOUT_H_ |
| +#pragma once |
| + |
| +#include "base/compiler_specific.h" |
| +#include "chrome/browser/chromeos/webui/login/browser/dom_browser_view.h" |
| +#include "chrome/browser/chromeos/status/status_area_host.h" |
| +#include "chrome/browser/ui/views/frame/browser_view_layout.h" |
| + |
| +namespace chromeos { |
| + |
| +class DOMBrowserView; |
| +class StatusAreaView; |
| + |
| +// LayoutManager for DOMBrowserView, which lays out the StatusAreaView in the |
| +// top corner and ommits the other elements that have been removed from the |
| +// view. There is a bar accross the top of the screen which is clearly divided |
| +// from the rest of the screen. The far left side will eventually have Add User |
| +// button in it. |
| +// |
| +// |-------------------------------------------------------| |
| +// |[ Future Add User button] [Status Area View]| <-- DOMBrowserView |
| +// |-------------------------------------------------------| |
| +// | | |
| +// | | |
| +// | DOM screen | |
| +// | | |
| +// | | |
| +// | | |
| +// |-------------------------------------------------------| |
| +// | | |
| +// | | |
| +// | Touch Keyboard | |
| +// | | |
| +// | | |
| +// |-------------------------------------------------------| |
| + |
| +class DOMBrowserViewLayout : public ::BrowserViewLayout { |
| + public: |
| + DOMBrowserViewLayout(); |
| + virtual ~DOMBrowserViewLayout(); |
| + |
| + // BrowserViewLayout overrides: |
| + virtual void Installed(views::View* host) OVERRIDE; |
| + virtual void ViewAdded(views::View* host, |
| + views::View* view) OVERRIDE; |
| + virtual bool IsPositionInWindowCaption(const gfx::Point& point) OVERRIDE; |
| + virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| + |
| + protected: |
| + // BrowserViewLayout overrides: |
| + virtual int LayoutTabStrip() OVERRIDE; |
| + virtual int LayoutToolbar(int top) OVERRIDE; |
| + virtual int LayoutBookmarkAndInfoBars(int top) OVERRIDE; |
| + |
| + private: |
| + DOMBrowserView* GetDOMBrowserView(); |
|
oshima
2011/03/17 18:49:31
const
rharrison
2011/03/21 19:49:08
Done.
|
| + StatusAreaView* status_area_; |
| + |
| + // Tests if the point is on one of views that are within the |
| + // considered title bar area of client view. |
| + bool IsPointInViewsInTitleArea(const gfx::Point& point) const; |
| + |
| + // Lays out tabstrip and status area in the title bar area (given by |
| + // |bounds|). |
| + int LayoutTitlebarComponents(const gfx::Rect& bounds); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DOMBrowserViewLayout); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_WEBUI_LOGIN_BROWSER_DOM_BROWSER_VIEW_LAYOUT_H_ |