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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry.h

Issue 1657933003: Fixes the interactive default browser UX for policy setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge issue Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 6 #define CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 : public shell_integration::DefaultWebClientObserver { 46 : public shell_integration::DefaultWebClientObserver {
47 public: 47 public:
48 explicit DefaultClientObserver(ProtocolHandlerRegistry* registry); 48 explicit DefaultClientObserver(ProtocolHandlerRegistry* registry);
49 ~DefaultClientObserver() override; 49 ~DefaultClientObserver() override;
50 50
51 // Get response from the worker regarding whether Chrome is the default 51 // Get response from the worker regarding whether Chrome is the default
52 // handler for the protocol. 52 // handler for the protocol.
53 void SetDefaultWebClientUIState( 53 void SetDefaultWebClientUIState(
54 shell_integration::DefaultWebClientUIState state) override; 54 shell_integration::DefaultWebClientUIState state) override;
55 55
56 bool IsInteractiveSetDefaultPermitted() override;
57
58 // Give the observer a handle to the worker, so we can find out the protocol 56 // Give the observer a handle to the worker, so we can find out the protocol
59 // when we're called and also tell the worker if we get deleted. 57 // when we're called and also tell the worker if we get deleted.
60 void SetWorker(shell_integration::DefaultProtocolClientWorker* worker); 58 void SetWorker(shell_integration::DefaultProtocolClientWorker* worker);
61 59
62 protected: 60 protected:
63 shell_integration::DefaultProtocolClientWorker* worker_; 61 shell_integration::DefaultProtocolClientWorker* worker_;
64 62
65 private: 63 private:
66 bool IsOwnedByWorker() override;
67
68 // This is a raw pointer, not reference counted, intentionally. In general 64 // This is a raw pointer, not reference counted, intentionally. In general
69 // subclasses of DefaultWebClientObserver are not able to be refcounted 65 // subclasses of DefaultWebClientObserver are not able to be refcounted
70 // e.g. the browser options page 66 // e.g. the browser options page
71 ProtocolHandlerRegistry* registry_; 67 ProtocolHandlerRegistry* registry_;
72 68
73 DISALLOW_COPY_AND_ASSIGN(DefaultClientObserver); 69 DISALLOW_COPY_AND_ASSIGN(DefaultClientObserver);
74 }; 70 };
75 71
76 // |Delegate| provides an interface for interacting asynchronously 72 // |Delegate| provides an interface for interacting asynchronously
77 // with the underlying OS for the purposes of registering Chrome 73 // with the underlying OS for the purposes of registering Chrome
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 382
387 // Copy of registry data for use on the IO thread. Changes to the registry 383 // Copy of registry data for use on the IO thread. Changes to the registry
388 // are posted to the IO thread where updates are applied to this object. 384 // are posted to the IO thread where updates are applied to this object.
389 scoped_refptr<IOThreadDelegate> io_thread_delegate_; 385 scoped_refptr<IOThreadDelegate> io_thread_delegate_;
390 386
391 DefaultClientObserverList default_client_observers_; 387 DefaultClientObserverList default_client_observers_;
392 388
393 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry); 389 DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistry);
394 }; 390 };
395 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_ 391 #endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698