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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILITY_ CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 protected: 59 protected:
60 // It's a reference-counted object, so destructor is not public. 60 // It's a reference-counted object, so destructor is not public.
61 ~ImageWriterUtilityClient() override; 61 ~ImageWriterUtilityClient() override;
62 62
63 private: 63 private:
64 // Ensures the UtilityProcessHost has been created. 64 // Ensures the UtilityProcessHost has been created.
65 void StartHost(); 65 void StartHost();
66 66
67 // UtilityProcessHostClient implementation. 67 // UtilityProcessHostClient implementation.
68 void OnProcessCrashed(int exit_code) override; 68 void OnProcessCrashed(int exit_code) override;
69 void OnProcessLaunchFailed() override; 69 void OnProcessLaunchFailed(int error_code) override;
70 bool OnMessageReceived(const IPC::Message& message) override; 70 bool OnMessageReceived(const IPC::Message& message) override;
71 virtual bool Send(IPC::Message* msg); 71 virtual bool Send(IPC::Message* msg);
72 72
73 // IPC message handlers. 73 // IPC message handlers.
74 void OnWriteImageSucceeded(); 74 void OnWriteImageSucceeded();
75 void OnWriteImageCancelled(); 75 void OnWriteImageCancelled();
76 void OnWriteImageFailed(const std::string& message); 76 void OnWriteImageFailed(const std::string& message);
77 void OnWriteImageProgress(int64_t progress); 77 void OnWriteImageProgress(int64_t progress);
78 78
79 CancelCallback cancel_callback_; 79 CancelCallback cancel_callback_;
80 ProgressCallback progress_callback_; 80 ProgressCallback progress_callback_;
81 SuccessCallback success_callback_; 81 SuccessCallback success_callback_;
82 ErrorCallback error_callback_; 82 ErrorCallback error_callback_;
83 83
84 base::WeakPtr<content::UtilityProcessHost> utility_process_host_; 84 base::WeakPtr<content::UtilityProcessHost> utility_process_host_;
85 85
86 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 86 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient); 88 DISALLOW_COPY_AND_ASSIGN(ImageWriterUtilityClient);
89 }; 89 };
90 90
91 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_ 91 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_IMAGE_WRITER_UTILI TY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698