Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / chrome / renderer / net / net_error_page_controller.h
bloba3146b560c85477dc7c7deaed3f660458d452587
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.
5 #ifndef CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_
6 #define CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_
8 #include "base/macros.h"
9 #include "content/public/renderer/render_frame_observer.h"
10 #include "gin/arguments.h"
11 #include "gin/wrappable.h"
14 namespace content {
15 class RenderFrame;
18 // This class makes various helper functions available to the
19 // error page loaded by NetErrorHelper. It is bound to the JavaScript
20 // window.errorPageController object.
21 class NetErrorPageController
22 : public gin::Wrappable<NetErrorPageController>,
23 public content::RenderFrameObserver {
24 public:
25 static gin::WrapperInfo kWrapperInfo;
27 static void Install(content::RenderFrame* render_frame);
29 private:
30 explicit NetErrorPageController(content::RenderFrame* render_frame);
31 ~NetErrorPageController() override;
33 // Execute a "Show saved copy" button click.
34 bool ShowSavedCopyButtonClick();
36 // Execute a "Reload" button click.
37 bool ReloadButtonClick();
39 // Execute a "Details" button click.
40 bool DetailsButtonClick();
42 // Track a click when the page has suggestions from the navigation correction
43 // service.
44 bool TrackClick(const gin::Arguments& args);
46 // Track easter egg plays.
47 void TrackEasterEgg();
49 // gin::WrappableBase
50 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
51 v8::Isolate* isolate) override;
53 // RenderFrameObserver. Overridden to avoid being destroyed when RenderFrame
54 // goes away; NetErrorPageController objects are owned by the JS
55 // garbage collector.
56 void OnDestruct() override;
58 DISALLOW_COPY_AND_ASSIGN(NetErrorPageController);
61 #endif // CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_