OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/apps/chrome_native_app_window_views_win.h" | 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h" |
6 | 6 |
7 #include "apps/ui/views/app_window_frame_view.h" | 7 #include "apps/ui/views/app_window_frame_view.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "extensions/browser/app_window/app_window_registry.h" | 29 #include "extensions/browser/app_window/app_window_registry.h" |
30 #include "extensions/browser/extension_util.h" | 30 #include "extensions/browser/extension_util.h" |
31 #include "extensions/common/extension.h" | 31 #include "extensions/common/extension.h" |
32 #include "ui/aura/remote_window_tree_host_win.h" | 32 #include "ui/aura/remote_window_tree_host_win.h" |
33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/base/win/shell.h" | 34 #include "ui/base/win/shell.h" |
35 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 35 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
36 #include "ui/views/win/hwnd_util.h" | 36 #include "ui/views/win/hwnd_util.h" |
37 | 37 |
38 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() | 38 ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin() |
39 : weak_ptr_factory_(this), glass_frame_view_(NULL) { | 39 : glass_frame_view_(NULL), weak_ptr_factory_(this) { |
40 } | 40 } |
41 | 41 |
42 void ChromeNativeAppWindowViewsWin::ActivateParentDesktopIfNecessary() { | 42 void ChromeNativeAppWindowViewsWin::ActivateParentDesktopIfNecessary() { |
43 // Only switching into Ash from Native is supported. Tearing the user out of | 43 // Only switching into Ash from Native is supported. Tearing the user out of |
44 // Metro mode can only be done by launching a process from Metro mode itself. | 44 // Metro mode can only be done by launching a process from Metro mode itself. |
45 // This is done for launching apps, but not regular activations. | 45 // This is done for launching apps, but not regular activations. |
46 if (IsRunningInAsh() && | 46 if (IsRunningInAsh() && |
47 chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_NATIVE) { | 47 chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_NATIVE) { |
48 chrome::ActivateMetroChrome(); | 48 chrome::ActivateMetroChrome(); |
49 } | 49 } |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 extension->id()); | 187 extension->id()); |
188 | 188 |
189 ShellLinkItemList items; | 189 ShellLinkItemList items; |
190 items.push_back(link); | 190 items.push_back(link); |
191 jumplist_updater.AddTasks(items); | 191 jumplist_updater.AddTasks(items); |
192 } | 192 } |
193 | 193 |
194 // Note that an empty jumplist must still be committed to clear all items. | 194 // Note that an empty jumplist must still be committed to clear all items. |
195 jumplist_updater.CommitUpdate(); | 195 jumplist_updater.CommitUpdate(); |
196 } | 196 } |
OLD | NEW |