* use gin converter in atom_api_menu * please only put necessary includes in header Having include in header means they have dependency relationship, putting arbitrary includes really really really really really makes refacoring much harder. * remove some simple uses of callback_converter_deprecated.h * use gin callback converter in file_dialog code * use gin in ErrorThrower * use gin in atom_bundle_mover * fix mistake in node stream * deprecate native_mate version of event_emitter_caller * use gin in node_bindings * remove usages of native_mate event_emitter_caller.h except for EventEmitter * fix compilation on Windows * gin::Arguments behaves differently on GetNext * just use StringToV8
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			796 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			796 B
			
		
	
	
	
		
			C++
		
	
	
	
	
	
// Copyright (c) 2019 GitHub, Inc.
 | 
						|
// Use of this source code is governed by the MIT license that can be
 | 
						|
// found in the LICENSE file.
 | 
						|
 | 
						|
#include "shell/common/deprecate_util.h"
 | 
						|
 | 
						|
#include "gin/dictionary.h"
 | 
						|
#include "shell/common/gin_converters/callback_converter.h"
 | 
						|
 | 
						|
namespace electron {
 | 
						|
 | 
						|
void EmitDeprecationWarning(node::Environment* env,
 | 
						|
                            const std::string& warning_msg,
 | 
						|
                            const std::string& warning_type) {
 | 
						|
  gin::Dictionary process(env->isolate(), env->process_object());
 | 
						|
 | 
						|
  base::RepeatingCallback<void(base::StringPiece, base::StringPiece,
 | 
						|
                               base::StringPiece)>
 | 
						|
      emit_warning;
 | 
						|
  process.Get("emitWarning", &emit_warning);
 | 
						|
 | 
						|
  emit_warning.Run(warning_msg, warning_type, "");
 | 
						|
}
 | 
						|
 | 
						|
}  // namespace electron
 |