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

Side by Side Diff: chrome/browser/webshare/share_service_impl.h

Issue 2688413006: Fixed crash if tab closes while WebShare picker dialog is open. (Closed)
Patch Set: Do Sam's suggestions. Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/webshare/share_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_dialogs.h" 16 #include "chrome/browser/ui/browser_dialogs.h"
16 #include "mojo/public/cpp/bindings/interface_request.h" 17 #include "mojo/public/cpp/bindings/interface_request.h"
17 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" 18 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
18 #include "third_party/WebKit/public/platform/site_engagement.mojom.h" 19 #include "third_party/WebKit/public/platform/site_engagement.mojom.h"
19 20
20 class DictionaryValue; 21 class DictionaryValue;
21 class GURL; 22 class GURL;
22 23
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 const GURL& share_url, 83 const GURL& share_url,
83 std::string* url_template_filled); 84 std::string* url_template_filled);
84 85
85 void OnPickerClosed(std::unique_ptr<base::DictionaryValue> share_targets, 86 void OnPickerClosed(std::unique_ptr<base::DictionaryValue> share_targets,
86 const std::string& title, 87 const std::string& title,
87 const std::string& text, 88 const std::string& text,
88 const GURL& share_url, 89 const GURL& share_url,
89 const ShareCallback& callback, 90 const ShareCallback& callback,
90 base::Optional<std::string> result); 91 base::Optional<std::string> result);
91 92
93 base::WeakPtrFactory<ShareServiceImpl> weak_factory_;
94
92 DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl); 95 DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl);
93 }; 96 };
94 97
95 #endif // CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_ 98 #endif // CHROME_BROWSER_WEBSHARE_SHARE_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/webshare/share_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698