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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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 "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "ui/views/widget/drop_helper.h" 51 #include "ui/views/widget/drop_helper.h"
52 #include "ui/views/widget/native_widget_aura.h" 52 #include "ui/views/widget/native_widget_aura.h"
53 #include "ui/views/widget/root_view.h" 53 #include "ui/views/widget/root_view.h"
54 #include "ui/views/widget/tooltip_manager_aura.h" 54 #include "ui/views/widget/tooltip_manager_aura.h"
55 #include "ui/views/widget/widget.h" 55 #include "ui/views/widget/widget.h"
56 #include "ui/views/widget/widget_aura_utils.h" 56 #include "ui/views/widget/widget_aura_utils.h"
57 #include "ui/views/widget/widget_delegate.h" 57 #include "ui/views/widget/widget_delegate.h"
58 #include "ui/views/widget/window_reorderer.h" 58 #include "ui/views/widget/window_reorderer.h"
59 59
60 #if defined(OS_WIN) 60 #if defined(OS_WIN)
61 #include "ui/base/win/shell.h"
61 #include "ui/gfx/win/dpi.h" 62 #include "ui/gfx/win/dpi.h"
62 #endif 63 #endif
63 64
64 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT, 65 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(VIEWS_EXPORT,
65 views::DesktopNativeWidgetAura*); 66 views::DesktopNativeWidgetAura*);
66 67
67 namespace views { 68 namespace views {
68 69
69 DEFINE_WINDOW_PROPERTY_KEY(DesktopNativeWidgetAura*, 70 DEFINE_WINDOW_PROPERTY_KEY(DesktopNativeWidgetAura*,
70 kDesktopNativeWidgetAuraKey, NULL); 71 kDesktopNativeWidgetAuraKey, NULL);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 522 }
522 523
523 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() { 524 NonClientFrameView* DesktopNativeWidgetAura::CreateNonClientFrameView() {
524 return desktop_root_window_host_->CreateNonClientFrameView(); 525 return desktop_root_window_host_->CreateNonClientFrameView();
525 } 526 }
526 527
527 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const { 528 bool DesktopNativeWidgetAura::ShouldUseNativeFrame() const {
528 return desktop_root_window_host_->ShouldUseNativeFrame(); 529 return desktop_root_window_host_->ShouldUseNativeFrame();
529 } 530 }
530 531
532 bool DesktopNativeWidgetAura::ShouldWindowContentsBeTransparent() const {
533 return desktop_root_window_host_->ShouldWindowContentsBeTransparent();
534 }
535
531 void DesktopNativeWidgetAura::FrameTypeChanged() { 536 void DesktopNativeWidgetAura::FrameTypeChanged() {
532 desktop_root_window_host_->FrameTypeChanged(); 537 desktop_root_window_host_->FrameTypeChanged();
533 UpdateWindowTransparency(); 538 UpdateWindowTransparency();
534 } 539 }
535 540
536 Widget* DesktopNativeWidgetAura::GetWidget() { 541 Widget* DesktopNativeWidgetAura::GetWidget() {
537 return native_widget_delegate_->AsWidget(); 542 return native_widget_delegate_->AsWidget();
538 } 543 }
539 544
540 const Widget* DesktopNativeWidgetAura::GetWidget() const { 545 const Widget* DesktopNativeWidgetAura::GetWidget() const {
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 DCHECK(!input_method_event_filter_.get()); 1155 DCHECK(!input_method_event_filter_.get());
1151 1156
1152 input_method_event_filter_.reset(new corewm::InputMethodEventFilter( 1157 input_method_event_filter_.reset(new corewm::InputMethodEventFilter(
1153 root_window_->host()->GetAcceleratedWidget())); 1158 root_window_->host()->GetAcceleratedWidget()));
1154 input_method_event_filter_->SetInputMethodPropertyInRootWindow( 1159 input_method_event_filter_->SetInputMethodPropertyInRootWindow(
1155 root_window_->window()); 1160 root_window_->window());
1156 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); 1161 root_window_event_filter_->AddHandler(input_method_event_filter_.get());
1157 } 1162 }
1158 1163
1159 void DesktopNativeWidgetAura::UpdateWindowTransparency() { 1164 void DesktopNativeWidgetAura::UpdateWindowTransparency() {
1160 content_window_->SetTransparent(ShouldUseNativeFrame()); 1165 content_window_->SetTransparent(
1166 desktop_root_window_host_->ShouldWindowContentsBeTransparent());
1161 } 1167 }
1162 1168
1163 } // namespace views 1169 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698