OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_ | |
6 #define CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "content/public/renderer/render_frame_observer.h" | |
10 #include "gin/wrappable.h" | |
11 | |
12 | |
13 namespace content { | |
14 class RenderFrame; | |
15 } | |
16 | |
17 // This class makes various helper functions available to the | |
18 // error page loaded by NetErrorHelper. It is bound to the JavaScript | |
19 // window.errorPageController object. | |
20 class NetErrorPageController | |
jar (doing other things)
2014/04/21 23:48:19
nit: Should this be in the net namespace?
Randy Smith (Not in Mondays)
2014/04/22 20:40:02
I followed the model of NetErrorHelper, which isn'
mmenke
2014/04/22 21:03:27
You're correct - neither browser/net nor renderer/
jar (doing other things)
2014/04/23 01:52:01
You're correct. This is not in the src/net/... pat
| |
21 : public gin::Wrappable<NetErrorPageController>, | |
22 public content::RenderFrameObserver { | |
23 public: | |
24 static gin::WrapperInfo kWrapperInfo; | |
25 | |
26 static void Install(content::RenderFrame* render_frame); | |
27 | |
28 private: | |
29 explicit NetErrorPageController(content::RenderFrame* render_frame); | |
30 virtual ~NetErrorPageController(); | |
31 | |
32 // Execute a "Load Stale" button click. | |
33 bool LoadStaleButtonClick(); | |
34 | |
35 // Execute a "Reload" button click. | |
36 bool ReloadButtonClick(); | |
37 | |
38 // Execute a "More" button click. | |
39 bool MoreButtonClick(); | |
40 | |
41 // gin::WrappableBase | |
42 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | |
43 v8::Isolate* isolate) OVERRIDE; | |
44 | |
45 // RenderFrameObserver. Overridden to avoid being destroyed when RenderFrame | |
46 // goes away; NetErrorPageController objects are owned by the JS | |
47 // garbage collector. | |
48 virtual void OnDestruct() OVERRIDE; | |
49 | |
50 DISALLOW_COPY_AND_ASSIGN(NetErrorPageController); | |
51 }; | |
52 | |
53 #endif // CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_ | |
OLD | NEW |