Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / content / shell / browser / layout_test / layout_test_bluetooth_chooser_factory.h
blob5f83f853ffca19caca1f077a3b0bbb3397e9dc63
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_CHOOSER_FACTORY_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_CHOOSER_FACTORY_H_
8 #include "content/public/browser/bluetooth_chooser.h"
10 #include <set>
11 #include <vector>
13 #include "base/memory/weak_ptr.h"
14 #include "content/public/browser/bluetooth_chooser.h"
16 class GURL;
18 namespace content {
20 class WebContents;
22 class LayoutTestBluetoothChooserFactory {
23 public:
24 LayoutTestBluetoothChooserFactory();
25 ~LayoutTestBluetoothChooserFactory();
27 scoped_ptr<BluetoothChooser> RunBluetoothChooser(
28 WebContents* web_contents,
29 const BluetoothChooser::EventHandler& event_handler,
30 const GURL& origin);
32 std::vector<std::string> GetAndResetEvents();
34 void SendEvent(BluetoothChooser::Event event, const std::string& device_id);
36 private:
37 class Chooser;
39 std::vector<std::string> events_;
41 // Contains the set of live choosers, in order to send them events.
42 std::set<Chooser*> choosers_;
44 base::WeakPtrFactory<LayoutTestBluetoothChooserFactory> weak_this_;
47 } // namespace content
49 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_CHOOSER_FACTORY_H_