Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: chrome/browser/chromeos/printer_detector/printer_detector.cc

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/printer_detector/printer_detector.h" 5 #include "chrome/browser/chromeos/printer_detector/printer_detector.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 PRINTER_SERVICE_EVENT_MAX); 164 PRINTER_SERVICE_EVENT_MAX);
165 webstore_widget_private_api::Options options; 165 webstore_widget_private_api::Options options;
166 options.type = webstore_widget_private_api::TYPE_PRINTER_PROVIDER; 166 options.type = webstore_widget_private_api::TYPE_PRINTER_PROVIDER;
167 options.usb_id.reset(new webstore_widget_private_api::UsbId()); 167 options.usb_id.reset(new webstore_widget_private_api::UsbId());
168 options.usb_id->vendor_id = vendor_id_; 168 options.usb_id->vendor_id = vendor_id_;
169 options.usb_id->product_id = product_id_; 169 options.usb_id->product_id = product_id_;
170 170
171 extensions::EventRouter* event_router = 171 extensions::EventRouter* event_router =
172 extensions::EventRouter::Get(browser_context_); 172 extensions::EventRouter::Get(browser_context_);
173 scoped_ptr<extensions::Event> event(new extensions::Event( 173 scoped_ptr<extensions::Event> event(new extensions::Event(
174 extensions::events::UNKNOWN,
174 webstore_widget_private_api::OnShowWidget::kEventName, 175 webstore_widget_private_api::OnShowWidget::kEventName,
175 webstore_widget_private_api::OnShowWidget::Create(options))); 176 webstore_widget_private_api::OnShowWidget::Create(options)));
176 event_router->DispatchEventToExtension(extension_misc::kWebstoreWidgetAppId, 177 event_router->DispatchEventToExtension(extension_misc::kWebstoreWidgetAppId,
177 event.Pass()); 178 event.Pass());
178 } 179 }
179 180
180 private: 181 private:
181 ~SearchPrinterAppNotificationDelegate() override = default; 182 ~SearchPrinterAppNotificationDelegate() override = default;
182 183
183 content::BrowserContext* browser_context_; 184 content::BrowserContext* browser_context_;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 : g_browser_process->notification_ui_manager(), 294 : g_browser_process->notification_ui_manager(),
294 device); 295 device);
295 } 296 }
296 297
297 void PrinterDetector::SetNotificationUIManagerForTesting( 298 void PrinterDetector::SetNotificationUIManagerForTesting(
298 NotificationUIManager* manager) { 299 NotificationUIManager* manager) {
299 notification_ui_manager_ = manager; 300 notification_ui_manager_ = manager;
300 } 301 }
301 302
302 } // namespace chromeos 303 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/launcher_search_provider/service.cc ('k') | chrome/browser/copresence/chrome_whispernet_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698