| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module blink.mojom; |
| |
| struct ColorSuggestion { |
| uint32 color; |
| string label; |
| }; |
| |
| // A ColorChooser window is shown for <input type="color">. |
| interface ColorChooserFactory { |
| OpenColorChooser( |
| pending_receiver<ColorChooser> chooser, |
| pending_remote<ColorChooserClient> client, |
| uint32 color, |
| array<ColorSuggestion> suggestions); |
| }; |
| |
| interface ColorChooser { |
| // Notifies browser of the selected color. |
| SetSelectedColor(uint32 color); |
| }; |
| |
| interface ColorChooserClient { |
| // Notifies the renderer that the user selected a color. |
| DidChooseColor(uint32 color); |
| }; |
| |
| // Interface exposed by the browser to the renderer. |
| interface EyeDropperChooser { |
| // EyeDropper window is shown. |
| Choose() => (bool success, uint32 color); |
| }; |