| 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 "chrome/renderer/net/net_error_page_controller.h" | 5 #include "chrome/renderer/net/net_error_page_controller.h" |
| 6 | 6 |
| 7 #include "base/strings/string_piece.h" | 7 #include "base/strings/string_piece.h" |
| 8 #include "chrome/renderer/net/net_error_helper.h" | 8 #include "chrome/renderer/net/net_error_helper.h" |
| 9 #include "content/public/renderer/render_frame.h" | 9 #include "content/public/renderer/render_frame.h" |
| 10 #include "gin/handle.h" | 10 #include "gin/handle.h" |
| 11 #include "gin/object_template_builder.h" | 11 #include "gin/object_template_builder.h" |
| 12 #include "third_party/WebKit/public/web/WebFrame.h" | |
| 13 #include "third_party/WebKit/public/web/WebKit.h" | 12 #include "third_party/WebKit/public/web/WebKit.h" |
| 13 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 14 | 14 |
| 15 gin::WrapperInfo NetErrorPageController::kWrapperInfo = { | 15 gin::WrapperInfo NetErrorPageController::kWrapperInfo = { |
| 16 gin::kEmbedderNativeGin}; | 16 gin::kEmbedderNativeGin}; |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 void NetErrorPageController::Install(content::RenderFrame* render_frame) { | 19 void NetErrorPageController::Install(content::RenderFrame* render_frame) { |
| 20 v8::Isolate* isolate = blink::mainThreadIsolate(); | 20 v8::Isolate* isolate = blink::mainThreadIsolate(); |
| 21 v8::HandleScope handle_scope(isolate); | 21 v8::HandleScope handle_scope(isolate); |
| 22 v8::Handle<v8::Context> context = | 22 v8::Handle<v8::Context> context = |
| 23 render_frame->GetWebFrame()->mainWorldScriptContext(); | 23 render_frame->GetWebFrame()->mainWorldScriptContext(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 &NetErrorPageController::LoadStaleButtonClick) | 99 &NetErrorPageController::LoadStaleButtonClick) |
| 100 .SetMethod("reloadButtonClick", | 100 .SetMethod("reloadButtonClick", |
| 101 &NetErrorPageController::ReloadButtonClick) | 101 &NetErrorPageController::ReloadButtonClick) |
| 102 .SetMethod("detailsButtonClick", | 102 .SetMethod("detailsButtonClick", |
| 103 &NetErrorPageController::DetailsButtonClick) | 103 &NetErrorPageController::DetailsButtonClick) |
| 104 .SetMethod("trackClick", | 104 .SetMethod("trackClick", |
| 105 &NetErrorPageController::TrackClick); | 105 &NetErrorPageController::TrackClick); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void NetErrorPageController::OnDestruct() {} | 108 void NetErrorPageController::OnDestruct() {} |
| OLD | NEW |