| 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/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 void LaunchDesktopInstanceHelper(const string16& url) { | 497 void LaunchDesktopInstanceHelper(const string16& url) { |
| 498 base::FilePath exe_path; | 498 base::FilePath exe_path; |
| 499 if (!PathService::Get(base::FILE_EXE, &exe_path)) | 499 if (!PathService::Get(base::FILE_EXE, &exe_path)) |
| 500 return; | 500 return; |
| 501 base::FilePath shortcut_path( | 501 base::FilePath shortcut_path( |
| 502 ShellIntegration::GetStartMenuShortcut(exe_path)); | 502 ShellIntegration::GetStartMenuShortcut(exe_path)); |
| 503 | 503 |
| 504 // Actually launching the process needs to happen in the metro viewer, | 504 // Actually launching the process needs to happen in the metro viewer, |
| 505 // otherwise it won't automatically transition to desktop. So we have | 505 // otherwise it won't automatically transition to desktop. So we have |
| 506 // to send an IPC to the viewer to do the ShellExecute. | 506 // to send an IPC to the viewer to do the ShellExecute. |
| 507 aura::RemoteWindowTreeHostWin::Instance()->HandleOpenURLOnDesktop( | 507 aura::RemoteRootWindowHostWin::Instance()->HandleOpenURLOnDesktop( |
| 508 shortcut_path, url); | 508 shortcut_path, url); |
| 509 } | 509 } |
| 510 #endif | 510 #endif |
| 511 | 511 |
| 512 bool PluginMetroModeInfoBarDelegate::Accept() { | 512 bool PluginMetroModeInfoBarDelegate::Accept() { |
| 513 chrome::AttemptRestartToDesktopMode(); | 513 chrome::AttemptRestartToDesktopMode(); |
| 514 return true; | 514 return true; |
| 515 } | 515 } |
| 516 | 516 |
| 517 string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { | 517 string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 529 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), | 529 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), |
| 530 content::Referrer(), | 530 content::Referrer(), |
| 531 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 531 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 532 content::PAGE_TRANSITION_LINK, false)); | 532 content::PAGE_TRANSITION_LINK, false)); |
| 533 return false; | 533 return false; |
| 534 } | 534 } |
| 535 | 535 |
| 536 #endif // defined(OS_WIN) | 536 #endif // defined(OS_WIN) |
| 537 | 537 |
| 538 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 538 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| OLD | NEW |