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

Side by Side Diff: chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on Android Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/api/cryptotoken_private/cryptotoken_private_ api.h" 5 #include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_ api.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 9 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
(...skipping 13 matching lines...) Expand all
24 namespace { 24 namespace {
25 25
26 class CryptotokenPermissionInfoBarDelegate : public ConfirmInfoBarDelegate { 26 class CryptotokenPermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
27 public: 27 public:
28 typedef base::Callback<void(cryptotoken_private::PermissionResult)> 28 typedef base::Callback<void(cryptotoken_private::PermissionResult)>
29 InfoBarCallback; 29 InfoBarCallback;
30 30
31 static void Create(InfoBarService* infobar_service, 31 static void Create(InfoBarService* infobar_service,
32 const base::string16& message, 32 const base::string16& message,
33 const InfoBarCallback& callback) { 33 const InfoBarCallback& callback) {
34 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( 34 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
35 scoped_ptr<ConfirmInfoBarDelegate>( 35 scoped_ptr<ConfirmInfoBarDelegate>(
36 new CryptotokenPermissionInfoBarDelegate(message, callback)))); 36 new CryptotokenPermissionInfoBarDelegate(message, callback))));
37 } 37 }
38 38
39 private: 39 private:
40 CryptotokenPermissionInfoBarDelegate(const base::string16& message, 40 CryptotokenPermissionInfoBarDelegate(const base::string16& message,
41 const InfoBarCallback& callback) 41 const InfoBarCallback& callback)
42 : message_(message), callback_(callback), answered_(false) {} 42 : message_(message), callback_(callback), answered_(false) {}
43 43
44 ~CryptotokenPermissionInfoBarDelegate() override { 44 ~CryptotokenPermissionInfoBarDelegate() override {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 void CryptotokenPrivateRequestPermissionFunction::OnInfobarResponse( 126 void CryptotokenPrivateRequestPermissionFunction::OnInfobarResponse(
127 cryptotoken_private::PermissionResult result) { 127 cryptotoken_private::PermissionResult result) {
128 Respond(ArgumentList( 128 Respond(ArgumentList(
129 cryptotoken_private::RequestPermission::Results::Create(result))); 129 cryptotoken_private::RequestPermission::Results::Create(result)));
130 } 130 }
131 131
132 } // namespace api 132 } // namespace api
133 } // namespace extensions 133 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/download_request_infobar_delegate.cc ('k') | chrome/browser/extensions/api/debugger/debugger_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698