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/conflicts_ui.h" | 5 #include "chrome/browser/ui/webui/conflicts_ui.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // | 73 // |
74 // ConflictsDOMHandler | 74 // ConflictsDOMHandler |
75 // | 75 // |
76 //////////////////////////////////////////////////////////////////////////////// | 76 //////////////////////////////////////////////////////////////////////////////// |
77 | 77 |
78 // The handler for JavaScript messages for the about:flags page. | 78 // The handler for JavaScript messages for the about:flags page. |
79 class ConflictsDOMHandler : public WebUIMessageHandler, | 79 class ConflictsDOMHandler : public WebUIMessageHandler, |
80 public content::NotificationObserver { | 80 public content::NotificationObserver { |
81 public: | 81 public: |
82 ConflictsDOMHandler() {} | 82 ConflictsDOMHandler() {} |
83 virtual ~ConflictsDOMHandler() {} | 83 ~ConflictsDOMHandler() override {} |
84 | 84 |
85 // WebUIMessageHandler implementation. | 85 // WebUIMessageHandler implementation. |
86 virtual void RegisterMessages(); | 86 void RegisterMessages() override; |
87 | 87 |
88 // Callback for the "requestModuleList" message. | 88 // Callback for the "requestModuleList" message. |
89 void HandleRequestModuleList(const base::ListValue* args); | 89 void HandleRequestModuleList(const base::ListValue* args); |
90 | 90 |
91 private: | 91 private: |
92 void SendModuleList(); | 92 void SendModuleList(); |
93 | 93 |
94 void Observe(int type, | 94 void Observe(int type, |
95 const content::NotificationSource& source, | 95 const content::NotificationSource& source, |
96 const content::NotificationDetails& details); | 96 const content::NotificationDetails& details) override; |
97 | 97 |
98 content::NotificationRegistrar registrar_; | 98 content::NotificationRegistrar registrar_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(ConflictsDOMHandler); | 100 DISALLOW_COPY_AND_ASSIGN(ConflictsDOMHandler); |
101 }; | 101 }; |
102 | 102 |
103 void ConflictsDOMHandler::RegisterMessages() { | 103 void ConflictsDOMHandler::RegisterMessages() { |
104 web_ui()->RegisterMessageCallback("requestModuleList", | 104 web_ui()->RegisterMessageCallback("requestModuleList", |
105 base::Bind(&ConflictsDOMHandler::HandleRequestModuleList, | 105 base::Bind(&ConflictsDOMHandler::HandleRequestModuleList, |
106 base::Unretained(this))); | 106 base::Unretained(this))); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 // static | 173 // static |
174 base::RefCountedMemory* ConflictsUI::GetFaviconResourceBytes( | 174 base::RefCountedMemory* ConflictsUI::GetFaviconResourceBytes( |
175 ui::ScaleFactor scale_factor) { | 175 ui::ScaleFactor scale_factor) { |
176 return static_cast<base::RefCountedMemory*>( | 176 return static_cast<base::RefCountedMemory*>( |
177 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( | 177 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( |
178 IDR_CONFLICT_FAVICON, scale_factor)); | 178 IDR_CONFLICT_FAVICON, scale_factor)); |
179 } | 179 } |
180 | 180 |
181 #endif | 181 #endif |
OLD | NEW |