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

Side by Side Diff: chrome/renderer/net/net_error_page_controller.h

Issue 207553008: Surface button for loading stale cache copy on net error page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrect spelling of iOS. Created 6 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 | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698