Index: chrome/browser/ui/views/frame/app_browser_frame_view_ash.cc |
diff --git a/chrome/browser/ui/views/frame/app_browser_frame_view_ash.cc b/chrome/browser/ui/views/frame/app_browser_frame_view_ash.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c5bd3be611789fcc8498200c632aee464741994 |
--- /dev/null |
+++ b/chrome/browser/ui/views/frame/app_browser_frame_view_ash.cc |
@@ -0,0 +1,78 @@ |
+// Copyright (c) 2012 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/ui/views/frame/app_browser_frame_view_ash.h" |
+ |
+#include "ash/wm/caption_buttons/hideable_caption_button_container.h" |
+#include "chrome/browser/ui/views/frame/browser_frame.h" |
+#include "chrome/browser/ui/views/frame/browser_view.h" |
+#include "grit/ash_resources.h" |
+#include "ui/aura/window.h" |
+#include "ui/base/hit_test.h" |
+ |
+// static |
+const char AppBrowserFrameViewAsh::kViewClassName[] = "AppBrowserFrameViewAsh"; |
+ |
+AppBrowserFrameViewAsh::AppBrowserFrameViewAsh( |
+ BrowserFrame* frame, BrowserView* browser_view) |
+ : BrowserNonClientFrameView(frame, browser_view) { |
+ frame->GetNativeView()->set_hit_test_bounds_override_inner(gfx::Insets()); |
+ int background_id = browser_view->IsOffTheRecord() ? |
+ IDR_AURA_WINDOW_HEADER_BASE_INCOGNITO_ACTIVE : |
+ IDR_AURA_WINDOW_HEADER_BASE_ACTIVE; |
+ container_.reset( |
+ new ash::HideableCaptionButtonContainer(background_id, frame)); |
+ container_->ShowButtonWidget(); |
+} |
+ |
+AppBrowserFrameViewAsh::~AppBrowserFrameViewAsh() { |
+} |
+ |
+gfx::Rect AppBrowserFrameViewAsh::GetBoundsForClientView() const { |
+ return GetLocalBounds(); |
+} |
+ |
+gfx::Rect AppBrowserFrameViewAsh::GetWindowBoundsForClientBounds( |
+ const gfx::Rect& client_bounds) const { |
+ return client_bounds; |
+} |
+ |
+int AppBrowserFrameViewAsh::NonClientHitTest( |
+ const gfx::Point& point) { |
+ return HTNOWHERE; |
+} |
+ |
+void AppBrowserFrameViewAsh::GetWindowMask(const gfx::Size& size, |
+ gfx::Path* window_mask) { |
+} |
+ |
+void AppBrowserFrameViewAsh::ResetWindowControls() { |
+} |
+ |
+void AppBrowserFrameViewAsh::UpdateWindowIcon() { |
+} |
+ |
+void AppBrowserFrameViewAsh::UpdateWindowTitle() { |
+} |
+ |
+gfx::Rect AppBrowserFrameViewAsh::GetBoundsForTabStrip( |
+ views::View* tabstrip) const { |
+ return gfx::Rect(); |
+} |
+ |
+BrowserNonClientFrameView::TabStripInsets |
+AppBrowserFrameViewAsh::GetTabStripInsets(bool restored) const { |
+ return TabStripInsets(); |
+} |
+ |
+int AppBrowserFrameViewAsh::GetThemeBackgroundXInset() const { |
+ return 0; |
+} |
+ |
+void AppBrowserFrameViewAsh::UpdateThrobber(bool running) { |
+} |
+ |
+const char* AppBrowserFrameViewAsh::GetClassName() const { |
+ return kViewClassName; |
+} |