Chromium Code Reviews| 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/basictypes.h" | |
|
mmenke
2014/04/11 19:42:32
Use macros.h instead (basictypes includes DISALLOW
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
| |
| 9 #include "content/public/renderer/render_frame_observer.h" | |
| 10 #include "gin/wrappable.h" | |
| 11 #include "url/gurl.h" | |
|
mmenke
2014/04/11 19:42:32
Not used.
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
| |
| 12 | |
| 13 // NetErrorPageController class: | |
|
mmenke
2014/04/11 19:42:32
optional: Think this is a little redundant. Sugg
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
| |
| 14 // | |
| 15 // This class makes cache loading operations available to the | |
| 16 // error page loaded by NetErrorHelper. It is bound to the javascript | |
|
mmenke
2014/04/11 19:42:32
nit: Javascript.
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done (JavaScript).
| |
| 17 // window.errorCacheLoad object. | |
|
mmenke
2014/04/11 19:42:32
These generally go right above the class, not the
mmenke
2014/04/11 19:42:32
The window.helperFunctions object, now. window.er
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
| |
| 18 | |
| 19 class GURL; | |
|
mmenke
2014/04/11 19:42:32
Not used.
Randy Smith (Not in Mondays)
2014/04/14 22:02:13
Done.
| |
| 20 | |
| 21 namespace content { | |
| 22 class RenderFrame; | |
| 23 } | |
| 24 | |
| 25 // Error page functions called from Javascript. | |
| 26 class NetErrorPageController | |
| 27 : public gin::Wrappable<NetErrorPageController>, | |
| 28 public content::RenderFrameObserver { | |
|
jochen (gone - plz use gerrit)
2014/04/14 07:32:35
why do you derive from RFO?
jochen (gone - plz use gerrit)
2014/04/14 13:11:53
ah, I see that you're using RenderFrameObserver::r
mmenke
2014/04/14 14:05:46
Yea, we're using the OnDestruct method, so we don'
| |
| 29 public: | |
| 30 static gin::WrapperInfo kWrapperInfo; | |
| 31 | |
| 32 static void Install(content::RenderFrame* render_frame); | |
| 33 | |
| 34 private: | |
| 35 explicit NetErrorPageController(content::RenderFrame* render_frame); | |
| 36 virtual ~NetErrorPageController(); | |
| 37 | |
| 38 // Execute a "Load Stale" button click. | |
| 39 bool LoadStaleButtonClick(); | |
| 40 | |
| 41 // Execute a "Reload" button click. | |
| 42 bool ReloadButtonClick(); | |
| 43 | |
| 44 // Execute a "More" button click. | |
| 45 bool MoreButtonClick(); | |
| 46 | |
| 47 // gin::WrappableBase | |
| 48 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | |
| 49 v8::Isolate* isolate) OVERRIDE; | |
| 50 | |
| 51 // RenderFrameObserver. Overridden to avoid being destroyed when RenderFrame | |
| 52 // goes away; NetErrorPageController objects are owned by the JS | |
| 53 // garbage collector. | |
| 54 virtual void OnDestruct() OVERRIDE; | |
| 55 | |
| 56 DISALLOW_COPY_AND_ASSIGN(NetErrorPageController); | |
| 57 }; | |
| 58 | |
| 59 #endif // CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_ | |
| OLD | NEW |