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

Side by Side Diff: chrome/browser/ui/webui/engagement/site_engagement_ui.cc

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: add 'define' to global interface expectations for AMD in layout tests Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/engagement/site_engagement_ui.h" 5 #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/engagement/site_engagement_service.h" 10 #include "chrome/browser/engagement/site_engagement_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 source->AddResourcePath("engagement_table.html", 81 source->AddResourcePath("engagement_table.html",
82 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_HTML); 82 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_HTML);
83 source->AddResourcePath("engagement_table.css", 83 source->AddResourcePath("engagement_table.css",
84 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_CSS); 84 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_CSS);
85 source->AddResourcePath("engagement_table.js", 85 source->AddResourcePath("engagement_table.js",
86 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_JS); 86 IDR_SITE_ENGAGEMENT_ENGAGEMENT_TABLE_JS);
87 source->AddResourcePath("site_engagement.js", IDR_SITE_ENGAGEMENT_JS); 87 source->AddResourcePath("site_engagement.js", IDR_SITE_ENGAGEMENT_JS);
88 source->AddResourcePath( 88 source->AddResourcePath(
89 "chrome/browser/ui/webui/engagement/site_engagement.mojom", 89 "chrome/browser/ui/webui/engagement/site_engagement.mojom",
90 IDR_SITE_ENGAGEMENT_MOJO_JS); 90 IDR_SITE_ENGAGEMENT_MOJO_JS);
91 source->AddMojoResources();
92 source->SetDefaultResource(IDR_SITE_ENGAGEMENT_HTML); 91 source->SetDefaultResource(IDR_SITE_ENGAGEMENT_HTML);
93 92
94 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source.release()); 93 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source.release());
95 } 94 }
96 95
97 SiteEngagementUI::~SiteEngagementUI() {} 96 SiteEngagementUI::~SiteEngagementUI() {}
98 97
99 void SiteEngagementUI::BindUIHandler( 98 void SiteEngagementUI::BindUIHandler(
100 mojo::InterfaceRequest<SiteEngagementUIHandler> request) { 99 mojo::InterfaceRequest<SiteEngagementUIHandler> request) {
101 ui_handler_.reset(new SiteEngagementUIHandlerImpl( 100 ui_handler_.reset(new SiteEngagementUIHandlerImpl(
102 Profile::FromWebUI(web_ui()), std::move(request))); 101 Profile::FromWebUI(web_ui()), std::move(request)));
103 } 102 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/omnibox/omnibox_ui.cc » ('j') | content/renderer/mojo_context_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698