OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/renderer/script_injection_manager.h" | 5 #include "extensions/renderer/script_injection_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 } // namespace | 34 } // namespace |
35 | 35 |
36 class ScriptInjectionManager::RVOHelper : public content::RenderViewObserver { | 36 class ScriptInjectionManager::RVOHelper : public content::RenderViewObserver { |
37 public: | 37 public: |
38 RVOHelper(content::RenderView* render_view, ScriptInjectionManager* manager); | 38 RVOHelper(content::RenderView* render_view, ScriptInjectionManager* manager); |
39 virtual ~RVOHelper(); | 39 virtual ~RVOHelper(); |
40 | 40 |
41 private: | 41 private: |
42 // RenderViewObserver implementation. | 42 // RenderViewObserver implementation. |
43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 43 virtual bool OnMessageReceived(const IPC::Message& message) override; |
44 virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) OVERRIDE; | 44 virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override; |
45 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; | 45 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) override; |
46 virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; | 46 virtual void DidFinishLoad(blink::WebLocalFrame* frame) override; |
47 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) OVERRIDE; | 47 virtual void DidStartProvisionalLoad(blink::WebLocalFrame* frame) override; |
48 virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; | 48 virtual void FrameDetached(blink::WebFrame* frame) override; |
49 virtual void OnDestruct() OVERRIDE; | 49 virtual void OnDestruct() override; |
50 | 50 |
51 virtual void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); | 51 virtual void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); |
52 virtual void OnExecuteDeclarativeScript(int tab_id, | 52 virtual void OnExecuteDeclarativeScript(int tab_id, |
53 const ExtensionId& extension_id, | 53 const ExtensionId& extension_id, |
54 int script_id, | 54 int script_id, |
55 const GURL& url); | 55 const GURL& url); |
56 virtual void OnPermitScriptInjection(int64 request_id); | 56 virtual void OnPermitScriptInjection(int64 request_id); |
57 | 57 |
58 // Tells the ScriptInjectionManager to run tasks associated with | 58 // Tells the ScriptInjectionManager to run tasks associated with |
59 // document_idle. | 59 // document_idle. |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 ScriptsRunInfo scripts_run_info; | 401 ScriptsRunInfo scripts_run_info; |
402 if (injection->OnPermissionGranted(extensions_->GetByID( | 402 if (injection->OnPermissionGranted(extensions_->GetByID( |
403 injection->extension_id()), | 403 injection->extension_id()), |
404 &scripts_run_info)) { | 404 &scripts_run_info)) { |
405 scripts_run_info.LogRun(injection->web_frame(), UserScript::RUN_DEFERRED); | 405 scripts_run_info.LogRun(injection->web_frame(), UserScript::RUN_DEFERRED); |
406 } | 406 } |
407 } | 407 } |
408 | 408 |
409 } // namespace extensions | 409 } // namespace extensions |
OLD | NEW |