| 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 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 int instance_id() const { return webview_instance_id_; } | 43 int instance_id() const { return webview_instance_id_; } |
| 44 | 44 |
| 45 extensions::ScriptExecutor* script_executor() { | 45 extensions::ScriptExecutor* script_executor() { |
| 46 return script_executor_.get(); | 46 return script_executor_.get(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 virtual ~WebViewGuest(); | 50 virtual ~WebViewGuest(); |
| 51 |
| 52 void DispatchEvent(const std::string& event_name, |
| 53 scoped_ptr<DictionaryValue> event); |
| 54 |
| 55 virtual void DidCommitProvisionalLoadForFrame( |
| 56 int64 frame_id, |
| 57 bool is_main_frame, |
| 58 const GURL& url, |
| 59 content::PageTransition transition_type, |
| 60 content::RenderViewHost* render_view_host) OVERRIDE; |
| 51 virtual void WebContentsDestroyed( | 61 virtual void WebContentsDestroyed( |
| 52 content::WebContents* web_contents) OVERRIDE; | 62 content::WebContents* web_contents) OVERRIDE; |
| 53 | 63 |
| 54 void AddWebViewToExtensionRendererState(); | 64 void AddWebViewToExtensionRendererState(); |
| 55 static void RemoveWebViewFromExtensionRendererState( | 65 static void RemoveWebViewFromExtensionRendererState( |
| 56 content::WebContents* web_contents); | 66 content::WebContents* web_contents); |
| 57 | 67 |
| 58 content::WebContents* embedder_web_contents_; | 68 content::WebContents* embedder_web_contents_; |
| 59 const std::string extension_id_; | 69 const std::string extension_id_; |
| 60 const int embedder_render_process_id_; | 70 const int embedder_render_process_id_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 71 ObserverList<extensions::TabHelper::ScriptExecutionObserver> | 81 ObserverList<extensions::TabHelper::ScriptExecutionObserver> |
| 72 script_observers_; | 82 script_observers_; |
| 73 scoped_ptr<extensions::ScriptExecutor> script_executor_; | 83 scoped_ptr<extensions::ScriptExecutor> script_executor_; |
| 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 |