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

Unified Diff: chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.cc

Issue 6577003: Entire DOMBrowser stack (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.cc
diff --git a/chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.cc b/chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.cc
new file mode 100644
index 0000000000000000000000000000000000000000..66d9a66deeac3e51530f9d089166135ccdb8dfd3
--- /dev/null
+++ b/chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.cc
@@ -0,0 +1,81 @@
+// Copyright (c) 2010 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.
+
+#include "chrome/browser/chromeos/webui/login/frame/dom_browser_frame_view.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
+#include "chrome/browser/tab_contents/navigation_controller.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/touch/frame/keyboard_container_view.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/chromeos/frame/browser_view.h"
+#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_type.h"
+#include "views/window/window.h"
+
+namespace chromeos {
+
+///////////////////////////////////////////////////////////////////////////////
+// DOMBrowserFrameView, public:
+
+DOMBrowserFrameView::DOMBrowserFrameView(::BrowserFrame* frame,
+ ::BrowserView* browser_view)
+ : TouchBrowserFrameView(frame, browser_view) {
+}
+
+DOMBrowserFrameView::~DOMBrowserFrameView() {
+}
+
+// static
+BrowserNonClientFrameView* DOMBrowserFrameView::CreateBrowserNonClientFrameView(
+ ::BrowserFrame* frame,
+ ::BrowserView* browser_view) {
+ return new DOMBrowserFrameView(frame, browser_view);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// DOMBrowserFrameView, protected:
+
+gfx::Rect DOMBrowserFrameView::GetBoundsForTabStrip(
+ views::View* tabstrip) const {
+ return gfx::Rect(0, 0, 0, 0);
+}
+
+void DOMBrowserFrameView::OnPaint(gfx::Canvas* canvas) {
+ PaintMaximizedFrameBorder(canvas);
+ PaintTitleBar(canvas);
+}
+
+bool DOMBrowserFrameView::HitTest(const gfx::Point& l) const {
+ // If the point is outside the bounds of the client area, claim it.
+ bool in_nonclient = NonClientFrameView::HitTest(l);
+ if (in_nonclient)
+ return in_nonclient;
+
+ // Otherwise claim it only if it's in a non-tab portion of the tabstrip.
+ bool vertical_tabs = browser_view_->UseVerticalTabs();
+ gfx::Rect tabstrip_bounds = gfx::Rect(0, 0, 0, 0);
+ gfx::Point tabstrip_origin(tabstrip_bounds.origin());
+ View::ConvertPointToView(frame_->GetWindow()->GetClientView(),
+ this, &tabstrip_origin);
+ tabstrip_bounds.set_origin(tabstrip_origin);
+ if ((!vertical_tabs && l.y() > tabstrip_bounds.bottom()) ||
+ (vertical_tabs && l.x() > tabstrip_bounds.right())) {
+ return false;
+ }
+
+ // We convert from our parent's coordinates since we assume we fill its bounds
+ // completely. We need to do this since we're not a parent of the tabstrip,
+ // meaning ConvertPointToView would otherwise return something bogus.
+ gfx::Point browser_view_point(l);
+ View::ConvertPointToView(parent(), browser_view_, &browser_view_point);
+ return browser_view_->IsPositionInWindowCaption(browser_view_point);
+}
+
+void DOMBrowserFrameView::LayoutOTRAvatar() { }
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698