| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | // Copyright (c) 2014 GitHub, Inc. All rights reserved.
 | 
					
						
							|  |  |  | // Use of this source code is governed by the MIT license that can be
 | 
					
						
							|  |  |  | // found in the LICENSE file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  | #ifndef ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
 | 
					
						
							|  |  |  | #define ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
 | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:44:15 +08:00
										 |  |  | #include <string>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | #include "native_mate/handle.h"
 | 
					
						
							|  |  |  | #include "native_mate/wrappable.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-28 22:33:00 +08:00
										 |  |  | namespace blink { | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  | class WebLocalFrame; | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace atom { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace api { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  | class WebFrame : public mate::Wrappable { | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  |  public: | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  |   static mate::Handle<WebFrame> Create(v8::Isolate* isolate); | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |  private: | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  |   WebFrame(); | 
					
						
							|  |  |  |   virtual ~WebFrame(); | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:44:15 +08:00
										 |  |  |   void SetName(const std::string& name); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-16 14:39:29 +08:00
										 |  |  |   double SetZoomLevel(double level); | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  |   double GetZoomLevel() const; | 
					
						
							| 
									
										
										
										
											2014-06-16 14:39:29 +08:00
										 |  |  |   double SetZoomFactor(double factor); | 
					
						
							|  |  |  |   double GetZoomFactor() const; | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-22 21:01:12 +08:00
										 |  |  |   v8::Handle<v8::Value> RegisterEmbedderCustomElement( | 
					
						
							|  |  |  |       const base::string16& name, v8::Handle<v8::Object> options); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  |   // mate::Wrappable:
 | 
					
						
							|  |  |  |   virtual mate::ObjectTemplateBuilder GetObjectTemplateBuilder( | 
					
						
							|  |  |  |       v8::Isolate* isolate); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  |   blink::WebLocalFrame* web_frame_; | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  |   DISALLOW_COPY_AND_ASSIGN(WebFrame); | 
					
						
							| 
									
										
										
										
											2014-06-16 14:27:57 +08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }  // namespace api
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }  // namespace atom
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-24 18:24:12 +08:00
										 |  |  | #endif  // ATOM_RENDERER_API_ATOM_API_WEB_FRAME_H_
 |