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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_ash.cc

Issue 796433003: MacViews: Don't draw custom frame on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keybinding3
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/window_properties.h" 8 #include "ash/wm/window_properties.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_state_delegate.h" 10 #include "ash/wm/window_state_delegate.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 params.context = ash::Shell::GetPrimaryRootWindow(); 133 params.context = ash::Shell::GetPrimaryRootWindow();
134 #if defined(OS_WIN) 134 #if defined(OS_WIN)
135 // If this window is under ASH on Windows, we need it to be translucent. 135 // If this window is under ASH on Windows, we need it to be translucent.
136 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 136 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
137 #endif 137 #endif
138 138
139 return params; 139 return params;
140 } 140 }
141 141
142 bool BrowserFrameAsh::UseCustomFrame() const {
143 return true;
144 }
145
142 bool BrowserFrameAsh::UsesNativeSystemMenu() const { 146 bool BrowserFrameAsh::UsesNativeSystemMenu() const {
143 return false; 147 return false;
144 } 148 }
145 149
146 int BrowserFrameAsh::GetMinimizeButtonOffset() const { 150 int BrowserFrameAsh::GetMinimizeButtonOffset() const {
147 return 0; 151 return 0;
148 } 152 }
149 153
150 BrowserFrameAsh::~BrowserFrameAsh() { 154 BrowserFrameAsh::~BrowserFrameAsh() {
151 } 155 }
152 156
153 /////////////////////////////////////////////////////////////////////////////// 157 ///////////////////////////////////////////////////////////////////////////////
154 // BrowserFrameAsh, private: 158 // BrowserFrameAsh, private:
155 159
156 void BrowserFrameAsh::SetWindowAutoManaged() { 160 void BrowserFrameAsh::SetWindowAutoManaged() {
157 if (!browser_view_->browser()->is_type_popup() || 161 if (!browser_view_->browser()->is_type_popup() ||
158 browser_view_->browser()->is_app()) { 162 browser_view_->browser()->is_app()) {
159 ash::wm::GetWindowState(GetNativeWindow())-> 163 ash::wm::GetWindowState(GetNativeWindow())->
160 set_window_position_managed(true); 164 set_window_position_managed(true);
161 } 165 }
162 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_ash.h ('k') | chrome/browser/ui/views/frame/browser_frame_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698