| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/ash/launcher/settings_window_observer.h" | 5 #include "chrome/browser/ui/ash/launcher/settings_window_observer.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_item_types.h" | 7 #include "ash/common/shelf/shelf_item_types.h" |
| 8 #include "ash/public/cpp/window_properties.h" |
| 8 #include "ash/resources/grit/ash_resources.h" | 9 #include "ash/resources/grit/ash_resources.h" |
| 9 #include "ash/wm/window_properties.h" | |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "chrome/browser/ui/ash/ash_util.h" | 11 #include "chrome/browser/ui/ash/ash_util.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
| 14 #include "chrome/browser/ui/settings_window_manager.h" | 14 #include "chrome/browser/ui/settings_window_manager.h" |
| 15 #include "components/strings/grit/components_strings.h" | 15 #include "components/strings/grit/components_strings.h" |
| 16 #include "services/ui/public/interfaces/window_manager.mojom.h" | 16 #include "services/ui/public/interfaces/window_manager.mojom.h" |
| 17 #include "ui/aura/client/aura_constants.h" | 17 #include "ui/aura/client/aura_constants.h" |
| 18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 19 #include "ui/base/class_property.h" | 19 #include "ui/base/class_property.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void SettingsWindowObserver::OnNewSettingsWindow(Browser* settings_browser) { | 53 void SettingsWindowObserver::OnNewSettingsWindow(Browser* settings_browser) { |
| 54 aura::Window* window = settings_browser->window()->GetNativeWindow(); | 54 aura::Window* window = settings_browser->window()->GetNativeWindow(); |
| 55 window->SetTitle(l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE)); | 55 window->SetTitle(l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE)); |
| 56 window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_DIALOG); | 56 window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_DIALOG); |
| 57 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 57 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 58 gfx::ImageSkia* icon = rb.GetImageSkiaNamed(IDR_ASH_SHELF_ICON_SETTINGS); | 58 gfx::ImageSkia* icon = rb.GetImageSkiaNamed(IDR_ASH_SHELF_ICON_SETTINGS); |
| 59 // The new gfx::ImageSkia instance is owned by the window itself. | 59 // The new gfx::ImageSkia instance is owned by the window itself. |
| 60 window->SetProperty(aura::client::kWindowIconKey, new gfx::ImageSkia(*icon)); | 60 window->SetProperty(aura::client::kWindowIconKey, new gfx::ImageSkia(*icon)); |
| 61 aura_window_tracker_->Add(window); | 61 aura_window_tracker_->Add(window); |
| 62 } | 62 } |
| OLD | NEW |