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

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

Issue 2693783005: Revert of Linux Aura: Use Aura theme on all windows when 'Use Classic theme' is used (Closed)
Patch Set: 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // deactivated (child widgets don't get native desktop activation changes, 383 // deactivated (child widgets don't get native desktop activation changes,
384 // only aura activation changes). 384 // only aura activation changes).
385 aura::Window* active_window = activation_client->GetActiveWindow(); 385 aura::Window* active_window = activation_client->GetActiveWindow();
386 if (active_window) { 386 if (active_window) {
387 activation_client->DeactivateWindow(active_window); 387 activation_client->DeactivateWindow(active_window);
388 GetInputMethod()->OnBlur(); 388 GetInputMethod()->OnBlur();
389 } 389 }
390 } 390 }
391 } 391 }
392 392
393 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
394 void* value) {
395 if (content_window_)
396 content_window_->SetNativeWindowProperty(name, value);
397 }
398
399 //////////////////////////////////////////////////////////////////////////////// 393 ////////////////////////////////////////////////////////////////////////////////
400 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation: 394 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation:
401 395
402 void DesktopNativeWidgetAura::InitNativeWidget( 396 void DesktopNativeWidgetAura::InitNativeWidget(
403 const Widget::InitParams& params) { 397 const Widget::InitParams& params) {
404 ownership_ = params.ownership; 398 ownership_ = params.ownership;
405 widget_type_ = params.type; 399 widget_type_ = params.type;
406 name_ = params.name; 400 name_ = params.name;
407 401
408 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); 402 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 588
595 void DesktopNativeWidgetAura::ReorderNativeViews() { 589 void DesktopNativeWidgetAura::ReorderNativeViews() {
596 window_reorderer_->ReorderChildWindows(); 590 window_reorderer_->ReorderChildWindows();
597 } 591 }
598 592
599 void DesktopNativeWidgetAura::ViewRemoved(View* view) { 593 void DesktopNativeWidgetAura::ViewRemoved(View* view) {
600 DCHECK(drop_helper_.get() != NULL); 594 DCHECK(drop_helper_.get() != NULL);
601 drop_helper_->ResetTargetViewIfEquals(view); 595 drop_helper_->ResetTargetViewIfEquals(view);
602 } 596 }
603 597
598 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
599 void* value) {
600 if (content_window_)
601 content_window_->SetNativeWindowProperty(name, value);
602 }
603
604 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const { 604 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const {
605 return content_window_ ? 605 return content_window_ ?
606 content_window_->GetNativeWindowProperty(name) : NULL; 606 content_window_->GetNativeWindowProperty(name) : NULL;
607 } 607 }
608 608
609 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const { 609 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const {
610 return tooltip_manager_.get(); 610 return tooltip_manager_.get();
611 } 611 }
612 612
613 void DesktopNativeWidgetAura::SetCapture() { 613 void DesktopNativeWidgetAura::SetCapture() {
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 if (cursor_reference_count_ == 0) { 1207 if (cursor_reference_count_ == 0) {
1208 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1208 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1209 // for cleaning up |cursor_manager_|. 1209 // for cleaning up |cursor_manager_|.
1210 delete cursor_manager_; 1210 delete cursor_manager_;
1211 native_cursor_manager_ = NULL; 1211 native_cursor_manager_ = NULL;
1212 cursor_manager_ = NULL; 1212 cursor_manager_ = NULL;
1213 } 1213 }
1214 } 1214 }
1215 1215
1216 } // namespace views 1216 } // 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