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

Unified Diff: chrome/browser/ui/views/website_settings/chooser_bubble_delegate.h

Issue 1408193003: Add chrome side webusb permission UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed mac sources from chrome_browser_ui.gypi Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/website_settings/chooser_bubble_delegate.h
diff --git a/chrome/browser/ui/views/website_settings/chooser_bubble_delegate.h b/chrome/browser/ui/views/website_settings/chooser_bubble_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9325363cbbc17035740431306991657e41f7758
--- /dev/null
+++ b/chrome/browser/ui/views/website_settings/chooser_bubble_delegate.h
@@ -0,0 +1,31 @@
+// Copyright 2015 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.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_
+#define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_
+
+#include "components/bubble/bubble_delegate.h"
+
+class Browser;
+class WebUsbPermissionBubbleRequest;
+
+// ChooserBubbleDelegate creates a bubble ui for chooser permission
+class ChooserBubbleDelegate : public BubbleDelegate {
+ public:
+ ChooserBubbleDelegate(Browser* browser,
+ scoped_ptr<WebUsbPermissionBubbleRequest> request);
+ ~ChooserBubbleDelegate() override;
+
+ // BubbleDelegate:
+ scoped_ptr<BubbleUi> BuildBubbleUi() override;
+ std::string GetName() const override;
+
+ private:
+ Browser* browser_;
+ scoped_ptr<WebUsbPermissionBubbleRequest> request_;
Reilly Grant (use Gerrit) 2015/10/20 22:17:07 Instead of holding the request the delegate should
juncai 2015/10/23 03:36:42 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(ChooserBubbleDelegate);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698