| OLD | NEW |
| 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 "chrome/browser/plugins/plugin_infobar_delegates.h" | 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 void LaunchDesktopInstanceHelper(const base::string16& url) { | 490 void LaunchDesktopInstanceHelper(const base::string16& url) { |
| 491 base::FilePath exe_path; | 491 base::FilePath exe_path; |
| 492 if (!PathService::Get(base::FILE_EXE, &exe_path)) | 492 if (!PathService::Get(base::FILE_EXE, &exe_path)) |
| 493 return; | 493 return; |
| 494 base::FilePath shortcut_path( | 494 base::FilePath shortcut_path( |
| 495 ShellIntegration::GetStartMenuShortcut(exe_path)); | 495 ShellIntegration::GetStartMenuShortcut(exe_path)); |
| 496 | 496 |
| 497 // Actually launching the process needs to happen in the metro viewer, | 497 // Actually launching the process needs to happen in the metro viewer, |
| 498 // otherwise it won't automatically transition to desktop. So we have | 498 // otherwise it won't automatically transition to desktop. So we have |
| 499 // to send an IPC to the viewer to do the ShellExecute. | 499 // to send an IPC to the viewer to do the ShellExecute. |
| 500 aura::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop( | 500 aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop( |
| 501 shortcut_path, url); | 501 shortcut_path, url); |
| 502 } | 502 } |
| 503 #endif | 503 #endif |
| 504 | 504 |
| 505 bool PluginMetroModeInfoBarDelegate::Accept() { | 505 bool PluginMetroModeInfoBarDelegate::Accept() { |
| 506 chrome::AttemptRestartToDesktopMode(); | 506 chrome::AttemptRestartToDesktopMode(); |
| 507 return true; | 507 return true; |
| 508 } | 508 } |
| 509 | 509 |
| 510 base::string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { | 510 base::string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 522 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), | 522 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), |
| 523 content::Referrer(), | 523 content::Referrer(), |
| 524 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 524 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 525 content::PAGE_TRANSITION_LINK, false)); | 525 content::PAGE_TRANSITION_LINK, false)); |
| 526 return false; | 526 return false; |
| 527 } | 527 } |
| 528 | 528 |
| 529 #endif // defined(OS_WIN) | 529 #endif // defined(OS_WIN) |
| 530 | 530 |
| 531 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 531 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| OLD | NEW |