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

Unified Diff: chrome/browser/chromeos/webui/login/browser/dom_browser_view_layout.h

Issue 6692001: Add in DOMBrowserView and Frame related classes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed DOMBrowserFrame* classes and added changes in line with oshima's comments Created 9 years, 9 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: 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..9a96ef49a977679a5a9a5f40d39970f907932213
--- /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:
+ const DOMBrowserView* GetDOMBrowserView();
+ 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_

Powered by Google App Engine
This is Rietveld 408576698