OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/options/options_ui.h" | 5 #include "chrome/browser/ui/webui/options/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // OptionsUIHTMLSource | 122 // OptionsUIHTMLSource |
123 // | 123 // |
124 //////////////////////////////////////////////////////////////////////////////// | 124 //////////////////////////////////////////////////////////////////////////////// |
125 | 125 |
126 class OptionsUIHTMLSource : public content::URLDataSource { | 126 class OptionsUIHTMLSource : public content::URLDataSource { |
127 public: | 127 public: |
128 // The constructor takes over ownership of |localized_strings|. | 128 // The constructor takes over ownership of |localized_strings|. |
129 explicit OptionsUIHTMLSource(base::DictionaryValue* localized_strings); | 129 explicit OptionsUIHTMLSource(base::DictionaryValue* localized_strings); |
130 | 130 |
131 // content::URLDataSource implementation. | 131 // content::URLDataSource implementation. |
132 virtual std::string GetSource() const OVERRIDE; | 132 virtual std::string GetSource() const override; |
133 virtual void StartDataRequest( | 133 virtual void StartDataRequest( |
134 const std::string& path, | 134 const std::string& path, |
135 int render_process_id, | 135 int render_process_id, |
136 int render_frame_id, | 136 int render_frame_id, |
137 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 137 const content::URLDataSource::GotDataCallback& callback) override; |
138 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 138 virtual std::string GetMimeType(const std::string&) const override; |
139 virtual bool ShouldDenyXFrameOptions() const OVERRIDE; | 139 virtual bool ShouldDenyXFrameOptions() const override; |
140 | 140 |
141 private: | 141 private: |
142 virtual ~OptionsUIHTMLSource(); | 142 virtual ~OptionsUIHTMLSource(); |
143 | 143 |
144 // Localized strings collection. | 144 // Localized strings collection. |
145 scoped_ptr<base::DictionaryValue> localized_strings_; | 145 scoped_ptr<base::DictionaryValue> localized_strings_; |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource); | 147 DISALLOW_COPY_AND_ASSIGN(OptionsUIHTMLSource); |
148 }; | 148 }; |
149 | 149 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // Add only if handler's service is enabled. | 474 // Add only if handler's service is enabled. |
475 if (handler->IsEnabled()) { | 475 if (handler->IsEnabled()) { |
476 // Add handler to the list and also pass the ownership. | 476 // Add handler to the list and also pass the ownership. |
477 web_ui()->AddMessageHandler(handler.release()); | 477 web_ui()->AddMessageHandler(handler.release()); |
478 handler_raw->GetLocalizedValues(localized_strings); | 478 handler_raw->GetLocalizedValues(localized_strings); |
479 handlers_.push_back(handler_raw); | 479 handlers_.push_back(handler_raw); |
480 } | 480 } |
481 } | 481 } |
482 | 482 |
483 } // namespace options | 483 } // namespace options |
OLD | NEW |