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

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: Move kThemeProfileKey into c/b/ui/views/frame/browser_view.h 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
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 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
393 void* value) {
394 if (content_window_)
395 content_window_->SetNativeWindowProperty(name, value);
396 }
397
392 //////////////////////////////////////////////////////////////////////////////// 398 ////////////////////////////////////////////////////////////////////////////////
393 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation: 399 // DesktopNativeWidgetAura, internal::NativeWidgetPrivate implementation:
394 400
395 void DesktopNativeWidgetAura::InitNativeWidget( 401 void DesktopNativeWidgetAura::InitNativeWidget(
396 const Widget::InitParams& params) { 402 const Widget::InitParams& params) {
397 ownership_ = params.ownership; 403 ownership_ = params.ownership;
398 widget_type_ = params.type; 404 widget_type_ = params.type;
399 name_ = params.name; 405 name_ = params.name;
400 406
401 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_); 407 NativeWidgetAura::RegisterNativeWidgetForWindow(this, content_window_);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 587
582 void DesktopNativeWidgetAura::ReorderNativeViews() { 588 void DesktopNativeWidgetAura::ReorderNativeViews() {
583 window_reorderer_->ReorderChildWindows(); 589 window_reorderer_->ReorderChildWindows();
584 } 590 }
585 591
586 void DesktopNativeWidgetAura::ViewRemoved(View* view) { 592 void DesktopNativeWidgetAura::ViewRemoved(View* view) {
587 DCHECK(drop_helper_.get() != NULL); 593 DCHECK(drop_helper_.get() != NULL);
588 drop_helper_->ResetTargetViewIfEquals(view); 594 drop_helper_->ResetTargetViewIfEquals(view);
589 } 595 }
590 596
591 void DesktopNativeWidgetAura::SetNativeWindowProperty(const char* name,
592 void* value) {
593 if (content_window_)
594 content_window_->SetNativeWindowProperty(name, value);
595 }
596
597 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const { 597 void* DesktopNativeWidgetAura::GetNativeWindowProperty(const char* name) const {
598 return content_window_ ? 598 return content_window_ ?
599 content_window_->GetNativeWindowProperty(name) : NULL; 599 content_window_->GetNativeWindowProperty(name) : NULL;
600 } 600 }
601 601
602 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const { 602 TooltipManager* DesktopNativeWidgetAura::GetTooltipManager() const {
603 return tooltip_manager_.get(); 603 return tooltip_manager_.get();
604 } 604 }
605 605
606 void DesktopNativeWidgetAura::SetCapture() { 606 void DesktopNativeWidgetAura::SetCapture() {
(...skipping 590 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

Powered by Google App Engine
This is Rietveld 408576698