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

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

Issue 2697513008: Linux Aura: Use Aura theme on all windows when 'Use Classic theme' is used (Closed)
Patch Set: No namespace Created 3 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // deactivated (child widgets don't get native desktop activation changes, 382 // deactivated (child widgets don't get native desktop activation changes,
383 // only aura activation changes). 383 // only aura activation changes).
384 aura::Window* active_window = activation_client->GetActiveWindow(); 384 aura::Window* active_window = activation_client->GetActiveWindow();
385 if (active_window) { 385 if (active_window) {
386 activation_client->DeactivateWindow(active_window); 386 activation_client->DeactivateWindow(active_window);
387 GetInputMethod()->OnBlur(); 387 GetInputMethod()->OnBlur();
388 } 388 }
389 } 389 }
390 } 390 }
391 391
392 gfx::NativeWindow DesktopNativeWidgetAura::GetNativeWindow() const {
393 return content_window_;
394 }
395
392 //////////////////////////////////////////////////////////////////////////////// 396 ////////////////////////////////////////////////////////////////////////////////
393 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation: 397 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation:
394 398
395 void DesktopNativeWidgetAura::InitNativeWidget( 399 void DesktopNativeWidgetAura::InitNativeWidget(
396 const Widget::InitParams& params) { 400 const Widget::InitParams& params) {
397 ownership_ = params.ownership; 401 ownership_ = params.ownership;
398 widget_type_ = params.type; 402 widget_type_ = params.type;
399 name_ = params.name; 403 name_ = params.name;
400 404
401 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); 405 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 560 }
557 561
558 const Widget* DesktopNativeWidgetAura::GetWidget() const { 562 const Widget* DesktopNativeWidgetAura::GetWidget() const {
559 return native_widget_delegate_->AsWidget(); 563 return native_widget_delegate_->AsWidget();
560 } 564 }
561 565
562 gfx::NativeView DesktopNativeWidgetAura::GetNativeView() const { 566 gfx::NativeView DesktopNativeWidgetAura::GetNativeView() const {
563 return content_window_; 567 return content_window_;
564 } 568 }
565 569
566 gfx::NativeWindow DesktopNativeWidgetAura::GetNativeWindow() const {
567 return content_window_;
568 }
569
570 Widget* DesktopNativeWidgetAura::GetTopLevelWidget() { 570 Widget* DesktopNativeWidgetAura::GetTopLevelWidget() {
571 return GetWidget(); 571 return GetWidget();
572 } 572 }
573 573
574 const ui::Compositor* DesktopNativeWidgetAura::GetCompositor() const { 574 const ui::Compositor* DesktopNativeWidgetAura::GetCompositor() const {
575 return content_window_ ? content_window_->layer()->GetCompositor() : NULL; 575 return content_window_ ? content_window_->layer()->GetCompositor() : NULL;
576 } 576 }
577 577
578 const ui::Layer* DesktopNativeWidgetAura::GetLayer() const { 578 const ui::Layer* DesktopNativeWidgetAura::GetLayer() const {
579 return content_window_ ? content_window_->layer() : NULL; 579 return content_window_ ? content_window_->layer() : NULL;
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 if (cursor_reference_count_ == 0) { 1197 if (cursor_reference_count_ == 0) {
1198 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1198 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1199 // for cleaning up |cursor_manager_|. 1199 // for cleaning up |cursor_manager_|.
1200 delete cursor_manager_; 1200 delete cursor_manager_;
1201 native_cursor_manager_ = NULL; 1201 native_cursor_manager_ = NULL;
1202 cursor_manager_ = NULL; 1202 cursor_manager_ = NULL;
1203 } 1203 }
1204 } 1204 }
1205 1205
1206 } // namespace views 1206 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698