| 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 20 matching lines...) Expand all Loading... |
| 31 static WebViewGuest* From(int embedder_process_id, int instance_id); | 31 static WebViewGuest* From(int embedder_process_id, int instance_id); |
| 32 | 32 |
| 33 content::WebContents* embedder_web_contents() const { | 33 content::WebContents* embedder_web_contents() const { |
| 34 return embedder_web_contents_; | 34 return embedder_web_contents_; |
| 35 } | 35 } |
| 36 | 36 |
| 37 content::WebContents* web_contents() const { | 37 content::WebContents* web_contents() const { |
| 38 return WebContentsObserver::web_contents(); | 38 return WebContentsObserver::web_contents(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // If possible, navigate the guest to |relative_index| entries away from the |
| 42 // current navigation entry. |
| 43 void Go(int relative_index); |
| 44 |
| 41 int instance_id() const { return webview_instance_id_; } | 45 int instance_id() const { return webview_instance_id_; } |
| 42 | 46 |
| 43 extensions::ScriptExecutor* script_executor() { | 47 extensions::ScriptExecutor* script_executor() { |
| 44 return script_executor_.get(); | 48 return script_executor_.get(); |
| 45 } | 49 } |
| 46 | 50 |
| 47 private: | 51 private: |
| 48 virtual ~WebViewGuest(); | 52 virtual ~WebViewGuest(); |
| 49 | 53 |
| 50 void DispatchEvent(const std::string& event_name, | 54 void DispatchEvent(const std::string& event_name, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 77 const int webview_instance_id_; | 81 const int webview_instance_id_; |
| 78 | 82 |
| 79 ObserverList<extensions::TabHelper::ScriptExecutionObserver> | 83 ObserverList<extensions::TabHelper::ScriptExecutionObserver> |
| 80 script_observers_; | 84 script_observers_; |
| 81 scoped_ptr<extensions::ScriptExecutor> script_executor_; | 85 scoped_ptr<extensions::ScriptExecutor> script_executor_; |
| 82 | 86 |
| 83 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 87 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
| 84 }; | 88 }; |
| 85 | 89 |
| 86 #endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ | 90 #endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_ |
| OLD | NEW |