| 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/chromeos/dbus/printer_service_provider.h" | 5 #include "chrome/browser/chromeos/dbus/printer_service_provider.h" |
| 6 | 6 |
| 7 #include "ash/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 GURL url(kCloudPrintLearnUrl); | 73 GURL url(kCloudPrintLearnUrl); |
| 74 | 74 |
| 75 if (!ActivateAndGetBrowserForUrl(url)) { | 75 if (!ActivateAndGetBrowserForUrl(url)) { |
| 76 chrome::ScopedTabbedBrowserDisplayer displayer( | 76 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 77 profile, chrome::HOST_DESKTOP_TYPE_ASH); | 77 profile, chrome::HOST_DESKTOP_TYPE_ASH); |
| 78 UMA_HISTOGRAM_ENUMERATION("PrinterService.PrinterServiceEvent", | 78 UMA_HISTOGRAM_ENUMERATION("PrinterService.PrinterServiceEvent", |
| 79 PAGE_DISPLAYED, PRINTER_SERVICE_EVENT_MAX); | 79 PAGE_DISPLAYED, PRINTER_SERVICE_EVENT_MAX); |
| 80 chrome::AddSelectedTabWithURL(displayer.browser(), url, | 80 chrome::AddSelectedTabWithURL(displayer.browser(), url, |
| 81 content::PAGE_TRANSITION_LINK); | 81 ui::PAGE_TRANSITION_LINK); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 namespace chromeos { | 87 namespace chromeos { |
| 88 | 88 |
| 89 PrinterServiceProvider::PrinterServiceProvider() | 89 PrinterServiceProvider::PrinterServiceProvider() |
| 90 : weak_ptr_factory_(this) { | 90 : weak_ptr_factory_(this) { |
| 91 } | 91 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 reader.PopString(&vendor); | 138 reader.PopString(&vendor); |
| 139 reader.PopString(&product); | 139 reader.PopString(&product); |
| 140 ShowCloudPrintHelp(vendor, product); | 140 ShowCloudPrintHelp(vendor, product); |
| 141 | 141 |
| 142 // Send an empty response. | 142 // Send an empty response. |
| 143 response_sender.Run(dbus::Response::FromMethodCall(method_call)); | 143 response_sender.Run(dbus::Response::FromMethodCall(method_call)); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } // namespace chromeos | 146 } // namespace chromeos |
| 147 | 147 |
| OLD | NEW |