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

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: Using SetProperty 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_->SetProperty(
655 aura::client::kWindowIconKey,
656 new gfx::ImageSkia(!window_icon.isNull() ? window_icon : app_icon));
sky 2016/08/09 21:24:27 Is it possible the app_icon is also null? I would
qiangchen 2016/08/09 22:07:34 Done.
657 }
654 } 658 }
655 659
656 void DesktopNativeWidgetAura::InitModalType(ui::ModalType modal_type) { 660 void DesktopNativeWidgetAura::InitModalType(ui::ModalType modal_type) {
657 // 99% of the time, we should not be asked to create a 661 // 99% of the time, we should not be asked to create a
658 // DesktopNativeWidgetAura that is modal. We only support window modal 662 // DesktopNativeWidgetAura that is modal. We only support window modal
659 // dialogs on the same lines as non AURA. 663 // dialogs on the same lines as non AURA.
660 desktop_window_tree_host_->InitModalType(modal_type); 664 desktop_window_tree_host_->InitModalType(modal_type);
661 } 665 }
662 666
663 gfx::Rect DesktopNativeWidgetAura::GetWindowBoundsInScreen() const { 667 gfx::Rect DesktopNativeWidgetAura::GetWindowBoundsInScreen() const {
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 if (cursor_reference_count_ == 0) { 1200 if (cursor_reference_count_ == 0) {
1197 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1201 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1198 // for cleaning up |cursor_manager_|. 1202 // for cleaning up |cursor_manager_|.
1199 delete cursor_manager_; 1203 delete cursor_manager_;
1200 native_cursor_manager_ = NULL; 1204 native_cursor_manager_ = NULL;
1201 cursor_manager_ = NULL; 1205 cursor_manager_ = NULL;
1202 } 1206 }
1203 } 1207 }
1204 1208
1205 } // namespace views 1209 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698