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

Side by Side Diff: chrome/browser/ui/webui/mojo_web_ui_controller.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" 12 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h"
13 #include "content/public/browser/render_frame_host.h" 13 #include "content/public/browser/render_frame_host.h"
14 #include "content/public/browser/render_view_host.h" 14 #include "content/public/browser/render_view_host.h"
15 #include "content/public/browser/web_ui_controller.h" 15 #include "content/public/browser/web_ui_controller.h"
16 #include "content/public/common/service_registry.h" 16 #include "content/public/common/service_registry.h"
17 #include "mojo/public/cpp/system/core.h" 17 #include "mojo/public/cpp/system/core.h"
18 18
19 class MojoWebUIHandler; 19 class MojoWebUIHandler;
20 20
21 namespace content { 21 namespace content {
22 class WebUIDataSource; 22 class WebUIDataSource;
23 } 23 }
24 24
25 class MojoWebUIControllerBase : public content::WebUIController { 25 class MojoWebUIControllerBase : public content::WebUIController {
26 public: 26 public:
27 explicit MojoWebUIControllerBase(content::WebUI* contents); 27 explicit MojoWebUIControllerBase(content::WebUI* contents);
28 virtual ~MojoWebUIControllerBase(); 28 ~MojoWebUIControllerBase() override;
29 29
30 // WebUIController overrides: 30 // WebUIController overrides:
31 virtual void RenderViewCreated( 31 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
32 content::RenderViewHost* render_view_host) override;
33 32
34 protected: 33 protected:
35 // Invoke to register mapping between binding file and resource id (IDR_...). 34 // Invoke to register mapping between binding file and resource id (IDR_...).
36 void AddMojoResourcePath(const std::string& path, int resource_id); 35 void AddMojoResourcePath(const std::string& path, int resource_id);
37 36
38 private: 37 private:
39 // Bindings files are registered here. 38 // Bindings files are registered here.
40 content::WebUIDataSource* mojo_data_source_; 39 content::WebUIDataSource* mojo_data_source_;
41 40
42 DISALLOW_COPY_AND_ASSIGN(MojoWebUIControllerBase); 41 DISALLOW_COPY_AND_ASSIGN(MojoWebUIControllerBase);
(...skipping 26 matching lines...) Expand all
69 // Invoked to create the specific bindings implementation. 68 // Invoked to create the specific bindings implementation.
70 virtual void BindUIHandler(mojo::InterfaceRequest<Interface> request) = 0; 69 virtual void BindUIHandler(mojo::InterfaceRequest<Interface> request) = 0;
71 70
72 private: 71 private:
73 base::WeakPtrFactory<MojoWebUIController> weak_factory_; 72 base::WeakPtrFactory<MojoWebUIController> weak_factory_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(MojoWebUIController); 74 DISALLOW_COPY_AND_ASSIGN(MojoWebUIController);
76 }; 75 };
77 76
78 #endif // CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_ 77 #endif // CHROME_BROWSER_UI_WEBUI_MOJO_WEB_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698