Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp

Issue 2811793005: Rename LocalFrame::Script() to GetScriptController() (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 String origin = frame->GetSecurityOrigin().ToString(); 90 String origin = frame->GetSecurityOrigin().ToString();
91 String script = injected_script_for_origin_.at(origin); 91 String script = injected_script_for_origin_.at(origin);
92 if (script.IsEmpty()) 92 if (script.IsEmpty())
93 return; 93 return;
94 static int last_script_id = 0; 94 static int last_script_id = 0;
95 StringBuilder script_with_id; 95 StringBuilder script_with_id;
96 script_with_id.Append(script); 96 script_with_id.Append(script);
97 script_with_id.Append('('); 97 script_with_id.Append('(');
98 script_with_id.AppendNumber(++last_script_id); 98 script_with_id.AppendNumber(++last_script_id);
99 script_with_id.Append(')'); 99 script_with_id.Append(')');
100 frame->GetFrame()->Script().ExecuteScriptInMainWorld( 100 frame->GetFrame()->GetScriptController().ExecuteScriptInMainWorld(
101 script_with_id.ToString()); 101 script_with_id.ToString());
102 } 102 }
103 103
104 void WebDevToolsFrontendImpl::SendMessageToEmbedder(const String& message) { 104 void WebDevToolsFrontendImpl::SendMessageToEmbedder(const String& message) {
105 if (client_) 105 if (client_)
106 client_->SendMessageToEmbedder(message); 106 client_->SendMessageToEmbedder(message);
107 } 107 }
108 108
109 bool WebDevToolsFrontendImpl::IsUnderTest() { 109 bool WebDevToolsFrontendImpl::IsUnderTest() {
110 return client_ ? client_->IsUnderTest() : false; 110 return client_ ? client_->IsUnderTest() : false;
111 } 111 }
112 112
113 void WebDevToolsFrontendImpl::ShowContextMenu( 113 void WebDevToolsFrontendImpl::ShowContextMenu(
114 LocalFrame* target_frame, 114 LocalFrame* target_frame,
115 float x, 115 float x,
116 float y, 116 float y,
117 ContextMenuProvider* menu_provider) { 117 ContextMenuProvider* menu_provider) {
118 WebLocalFrameImpl::FromFrame(target_frame) 118 WebLocalFrameImpl::FromFrame(target_frame)
119 ->ViewImpl() 119 ->ViewImpl()
120 ->ShowContextMenuAtPoint(x, y, menu_provider); 120 ->ShowContextMenuAtPoint(x, y, menu_provider);
121 } 121 }
122 122
123 void WebDevToolsFrontendImpl::SetInjectedScriptForOrigin(const String& origin, 123 void WebDevToolsFrontendImpl::SetInjectedScriptForOrigin(const String& origin,
124 const String& source) { 124 const String& source) {
125 injected_script_for_origin_.Set(origin, source); 125 injected_script_for_origin_.Set(origin, source);
126 } 126 }
127 127
128 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698