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

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

Issue 2222703002: Aura Icon Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Icons To Aura::Window Created 4 years, 4 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/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } 642 }
643 643
644 bool DesktopNativeWidgetAura::SetWindowTitle(const base::string16& title) { 644 bool DesktopNativeWidgetAura::SetWindowTitle(const base::string16& title) {
645 if (!content_window_) 645 if (!content_window_)
646 return false; 646 return false;
647 return desktop_window_tree_host_->SetWindowTitle(title); 647 return desktop_window_tree_host_->SetWindowTitle(title);
648 } 648 }
649 649
650 void DesktopNativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon, 650 void DesktopNativeWidgetAura::SetWindowIcons(const gfx::ImageSkia& window_icon,
651 const gfx::ImageSkia& app_icon) { 651 const gfx::ImageSkia& app_icon) {
652 if (content_window_) 652 if (content_window_) {
653 desktop_window_tree_host_->SetWindowIcons(window_icon, app_icon); 653 desktop_window_tree_host_->SetWindowIcons(window_icon, app_icon);
654 content_window_->SetIcon(!window_icon.isNull() ? window_icon : app_icon);
sky 2016/08/08 19:19:47 Does the window capture work on non-chromeos platf
qiangchen 2016/08/09 16:48:40 Yes. But that part of development (OS API calls) m
sky 2016/08/09 19:12:11 I wanted to make sure you really wanted this on no
qiangchen 2016/08/09 21:10:28 Yes. Currently we use aura capture for the chrome
655 }
654 } 656 }
655 657
656 void DesktopNativeWidgetAura::InitModalType(ui::ModalType modal_type) { 658 void DesktopNativeWidgetAura::InitModalType(ui::ModalType modal_type) {
657 // 99% of the time, we should not be asked to create a 659 // 99% of the time, we should not be asked to create a
658 // DesktopNativeWidgetAura that is modal. We only support window modal 660 // DesktopNativeWidgetAura that is modal. We only support window modal
659 // dialogs on the same lines as non AURA. 661 // dialogs on the same lines as non AURA.
660 desktop_window_tree_host_->InitModalType(modal_type); 662 desktop_window_tree_host_->InitModalType(modal_type);
661 } 663 }
662 664
663 gfx::Rect DesktopNativeWidgetAura::GetWindowBoundsInScreen() const { 665 gfx::Rect DesktopNativeWidgetAura::GetWindowBoundsInScreen() const {
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 if (cursor_reference_count_ == 0) { 1198 if (cursor_reference_count_ == 0) {
1197 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1199 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1198 // for cleaning up |cursor_manager_|. 1200 // for cleaning up |cursor_manager_|.
1199 delete cursor_manager_; 1201 delete cursor_manager_;
1200 native_cursor_manager_ = NULL; 1202 native_cursor_manager_ = NULL;
1201 cursor_manager_ = NULL; 1203 cursor_manager_ = NULL;
1202 } 1204 }
1203 } 1205 }
1204 1206
1205 } // namespace views 1207 } // namespace views
OLDNEW
« ui/aura/window.h ('K') | « ui/aura/window.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698