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

Unified Diff: chrome/browser/ui/views/frame/app_browser_frame_view_ash.cc

Issue 25536010: Make packaged apps use AppNonClientFrameViewAsh when maximized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/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;
+}

Powered by Google App Engine
This is Rietveld 408576698