| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_WEBVIEW_WEBVIEW_GUEST_H_ | 5 #ifndef CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ |
| 6 #define CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ | 6 #define CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ |
| 7 | 7 |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "chrome/browser/extensions/tab_helper.h" | 9 #include "chrome/browser/extensions/tab_helper.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 int instance_id() const { return webview_instance_id_; } | 42 int instance_id() const { return webview_instance_id_; } |
| 43 | 43 |
| 44 extensions::ScriptExecutor* script_executor() { | 44 extensions::ScriptExecutor* script_executor() { |
| 45 return script_executor_.get(); | 45 return script_executor_.get(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 virtual ~WebViewGuest(); | 49 virtual ~WebViewGuest(); |
| 50 |
| 51 void DispatchEvent(const std::string& event_name, |
| 52 scoped_ptr<DictionaryValue> event); |
| 53 |
| 54 virtual void DidCommitProvisionalLoadForFrame( |
| 55 int64 frame_id, |
| 56 bool is_main_frame, |
| 57 const GURL& url, |
| 58 content::PageTransition transition_type, |
| 59 content::RenderViewHost* render_view_host) OVERRIDE; |
| 50 virtual void WebContentsDestroyed( | 60 virtual void WebContentsDestroyed( |
| 51 content::WebContents* web_contents) OVERRIDE; | 61 content::WebContents* web_contents) OVERRIDE; |
| 52 | 62 |
| 53 void AddWebViewToExtensionRendererState(); | 63 void AddWebViewToExtensionRendererState(); |
| 54 static void RemoveWebViewFromExtensionRendererState( | 64 static void RemoveWebViewFromExtensionRendererState( |
| 55 content::WebContents* web_contents); | 65 content::WebContents* web_contents); |
| 56 | 66 |
| 57 content::WebContents* embedder_web_contents_; | 67 content::WebContents* embedder_web_contents_; |
| 58 const std::string extension_id_; | 68 const std::string extension_id_; |
| 59 const int embedder_render_process_id_; | 69 const int embedder_render_process_id_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 71 script_observers_; | 81 script_observers_; |
| 72 scoped_ptr<extensions::ScriptExecutor> script_executor_; | 82 scoped_ptr<extensions::ScriptExecutor> script_executor_; |
| 73 | 83 |
| 74 | 84 |
| 75 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 85 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 76 }; | 86 }; |
| 77 | 87 |
| 78 } // namespace chrome | 88 } // namespace chrome |
| 79 | 89 |
| 80 #endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ | 90 #endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ |
| OLD | NEW |