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

Side by Side Diff: ios/chrome/browser/ui/webui/physical_web_ui.cc

Issue 2717363003: Add Physical Web WebUI Default Url Icon (Closed)
Patch Set: create differnt versions of img Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/webui/physical_web_ui.h" 5 #include "ios/chrome/browser/ui/webui/physical_web_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/metrics/user_metrics.h" 9 #include "base/metrics/user_metrics.h"
10 #include "components/grit/components_resources.h" 10 #include "components/grit/components_resources.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // Localized and data strings. 28 // Localized and data strings.
29 html_source->AddLocalizedString(physical_web_ui::kTitle, 29 html_source->AddLocalizedString(physical_web_ui::kTitle,
30 IDS_PHYSICAL_WEB_UI_TITLE); 30 IDS_PHYSICAL_WEB_UI_TITLE);
31 31
32 html_source->SetJsonPath("strings.js"); 32 html_source->SetJsonPath("strings.js");
33 html_source->AddResourcePath(physical_web_ui::kPhysicalWebJS, 33 html_source->AddResourcePath(physical_web_ui::kPhysicalWebJS,
34 IDR_PHYSICAL_WEB_UI_JS); 34 IDR_PHYSICAL_WEB_UI_JS);
35 html_source->AddResourcePath(physical_web_ui::kPhysicalWebCSS, 35 html_source->AddResourcePath(physical_web_ui::kPhysicalWebCSS,
36 IDR_PHYSICAL_WEB_UI_CSS); 36 IDR_PHYSICAL_WEB_UI_CSS);
37 html_source->AddResourcePath(physical_web_ui::kPhysicalWebLinkIcon,
38 IDR_PHYSICAL_WEB_UI_LINK_ICON);
37 html_source->SetDefaultResource(IDR_PHYSICAL_WEB_UI_HTML); 39 html_source->SetDefaultResource(IDR_PHYSICAL_WEB_UI_HTML);
38 return html_source; 40 return html_source;
39 } 41 }
40 42
41 // Implements all MessageHandler core functionality. This is extends the 43 // Implements all MessageHandler core functionality. This is extends the
42 // PhysicalWebBaseMessageHandler and implements functions to manipulate an 44 // PhysicalWebBaseMessageHandler and implements functions to manipulate an
43 // iOS-specific WebUI object. 45 // iOS-specific WebUI object.
44 class MessageHandlerImpl 46 class MessageHandlerImpl
45 : public physical_web_ui::PhysicalWebBaseMessageHandler { 47 : public physical_web_ui::PhysicalWebBaseMessageHandler {
46 public: 48 public:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 : web::WebUIIOSController(web_ui) { 101 : web::WebUIIOSController(web_ui) {
100 web_ui->AddMessageHandler(base::MakeUnique<PhysicalWebDOMHandler>()); 102 web_ui->AddMessageHandler(base::MakeUnique<PhysicalWebDOMHandler>());
101 103
102 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), 104 web::WebUIIOSDataSource::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui),
103 CreatePhysicalWebUIDataSource()); 105 CreatePhysicalWebUIDataSource());
104 106
105 base::RecordAction(base::UserMetricsAction("PhysicalWeb.WebUI.Open")); 107 base::RecordAction(base::UserMetricsAction("PhysicalWeb.WebUI.Open"));
106 } 108 }
107 109
108 PhysicalWebUI::~PhysicalWebUI() {} 110 PhysicalWebUI::~PhysicalWebUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698