OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/layout_test_controller_bindings.h" | 5 #include "content/shell/layout_test_controller_bindings.h" |
6 | 6 |
7 #include "base/string_piece.h" | 7 #include "base/string_piece.h" |
8 #include "content/public/renderer/render_view.h" | 8 #include "content/public/renderer/render_view.h" |
9 #include "content/shell/shell_messages.h" | 9 #include "content/shell/shell_messages.h" |
10 #include "grit/shell_resources.h" | 10 #include "grit/shell_resources.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 v8::Handle<v8::FunctionTemplate> | 117 v8::Handle<v8::FunctionTemplate> |
118 LayoutTestControllerBindings::GetNativeFunction(v8::Handle<v8::String> name) { | 118 LayoutTestControllerBindings::GetNativeFunction(v8::Handle<v8::String> name) { |
119 if (name->Equals(v8::String::New("NotifyDone"))) | 119 if (name->Equals(v8::String::New("NotifyDone"))) |
120 return v8::FunctionTemplate::New(NotifyDone); | 120 return v8::FunctionTemplate::New(NotifyDone); |
121 if (name->Equals(v8::String::New("SetDumpAsText"))) | 121 if (name->Equals(v8::String::New("SetDumpAsText"))) |
122 return v8::FunctionTemplate::New(SetDumpAsText); | 122 return v8::FunctionTemplate::New(SetDumpAsText); |
123 if (name->Equals(v8::String::New("SetDumpChildFramesAsText"))) | 123 if (name->Equals(v8::String::New("SetDumpChildFramesAsText"))) |
124 return v8::FunctionTemplate::New(SetDumpChildFramesAsText); | 124 return v8::FunctionTemplate::New(SetDumpChildFramesAsText); |
125 if (name->Equals(v8::String::New("SetPrinting"))) | 125 if (name->Equals(v8::String::New("SetPrinting"))) |
126 return v8::FunctionTemplate::New(SetPrinting); | 126 return v8::FunctionTemplate::New(SetPrinting); |
| 127 if (name->Equals(v8::String::New( |
| 128 "SetShouldStayOnPageAfterHandlingBeforeUnload"))) { |
| 129 return v8::FunctionTemplate::New( |
| 130 SetShouldStayOnPageAfterHandlingBeforeUnload); |
| 131 } |
127 if (name->Equals(v8::String::New("SetWaitUntilDone"))) | 132 if (name->Equals(v8::String::New("SetWaitUntilDone"))) |
128 return v8::FunctionTemplate::New(SetWaitUntilDone); | 133 return v8::FunctionTemplate::New(SetWaitUntilDone); |
129 | 134 |
130 NOTREACHED(); | 135 NOTREACHED(); |
131 return v8::FunctionTemplate::New(); | 136 return v8::FunctionTemplate::New(); |
132 } | 137 } |
133 | 138 |
134 } // namespace content | 139 } // namespace content |
OLD | NEW |