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

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

Issue 12251010: Ensure that when themes in desktop chrome AURA on Windows use the opaque browser frame view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/desktop_browser_frame_aura.h" 5 #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host.h" 8 #include "chrome/browser/ui/views/frame/browser_desktop_root_window_host.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "grit/chromium_strings.h" 10 #include "grit/chromium_strings.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "ui/aura/client/aura_constants.h" 12 #include "ui/aura/client/aura_constants.h"
13 #include "ui/aura/root_window.h" 13 #include "ui/aura/root_window.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_observer.h" 15 #include "ui/aura/window_observer.h"
16 #include "ui/base/hit_test.h" 16 #include "ui/base/hit_test.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/models/simple_menu_model.h" 18 #include "ui/base/models/simple_menu_model.h"
19 #include "ui/gfx/font.h" 19 #include "ui/gfx/font.h"
20 #include "ui/views/corewm/visibility_controller.h" 20 #include "ui/views/corewm/visibility_controller.h"
21 #include "ui/views/view.h" 21 #include "ui/views/view.h"
22 #include "ui/views/widget/widget.h"
23
24 #if defined(OS_WIN)
25 #include "chrome/browser/ui/views/frame/browser_frame_common_win.h"
26 #endif
22 27
23 using aura::Window; 28 using aura::Window;
24 29
25 /////////////////////////////////////////////////////////////////////////////// 30 ///////////////////////////////////////////////////////////////////////////////
26 // DesktopBrowserFrameAura, public: 31 // DesktopBrowserFrameAura, public:
27 32
28 DesktopBrowserFrameAura::DesktopBrowserFrameAura( 33 DesktopBrowserFrameAura::DesktopBrowserFrameAura(
29 BrowserFrame* browser_frame, 34 BrowserFrame* browser_frame,
30 BrowserView* browser_view) 35 BrowserView* browser_view)
31 : views::DesktopNativeWidgetAura(browser_frame), 36 : views::DesktopNativeWidgetAura(browser_frame),
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return browser_desktop_root_window_host_->UsesNativeSystemMenu(); 84 return browser_desktop_root_window_host_->UsesNativeSystemMenu();
80 } 85 }
81 86
82 int DesktopBrowserFrameAura::GetMinimizeButtonOffset() const { 87 int DesktopBrowserFrameAura::GetMinimizeButtonOffset() const {
83 return browser_desktop_root_window_host_->GetMinimizeButtonOffset(); 88 return browser_desktop_root_window_host_->GetMinimizeButtonOffset();
84 } 89 }
85 90
86 void DesktopBrowserFrameAura::TabStripDisplayModeChanged() { 91 void DesktopBrowserFrameAura::TabStripDisplayModeChanged() {
87 } 92 }
88 93
94 bool DesktopBrowserFrameAura::ShouldUseNativeFrame() const {
95 #if !defined(OS_WIN)
sky 2013/02/13 00:42:54 Can you forward this to browser_desktop_root_windo
ananta 2013/02/13 01:43:21 I removed this method which achieves what you desc
96 return views::DesktopNativeWidgetAura::ShouldUseNativeFrame();
97 #else
98 return browser::ShouldUseNativeFrame(this,
99 browser_view_,
100 GetWidget()->GetThemeProvider());
101 #endif
102 }
103
104
89 /////////////////////////////////////////////////////////////////////////////// 105 ///////////////////////////////////////////////////////////////////////////////
90 // DesktopBrowserFrameAura, private: 106 // DesktopBrowserFrameAura, private:
91 107
92 DesktopBrowserFrameAura::~DesktopBrowserFrameAura() { 108 DesktopBrowserFrameAura::~DesktopBrowserFrameAura() {
93 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698