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

Side by Side Diff: chrome/browser/ui/webui/options/web_intents_settings_handler.cc

Issue 8417043: Add webkit_glue namespace. Improve some variable and test names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/web_intents_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/web_intents_settings_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browsing_data_appcache_helper.h" 10 #include "chrome/browser/browsing_data_appcache_helper.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 while (!node->empty()) { 109 while (!node->empty()) {
110 WebIntentsTreeNode* cnode = node->GetChild(0); 110 WebIntentsTreeNode* cnode = node->GetChild(0);
111 CHECK(cnode->Type() == WebIntentsTreeNode::TYPE_SERVICE); 111 CHECK(cnode->Type() == WebIntentsTreeNode::TYPE_SERVICE);
112 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(cnode); 112 ServiceTreeNode* snode = static_cast<ServiceTreeNode*>(cnode);
113 RemoveService(snode); 113 RemoveService(snode);
114 } 114 }
115 delete intents_tree_model_->Remove(node->parent(), node); 115 delete intents_tree_model_->Remove(node->parent(), node);
116 } 116 }
117 117
118 void WebIntentsSettingsHandler::RemoveService(ServiceTreeNode* snode) { 118 void WebIntentsSettingsHandler::RemoveService(ServiceTreeNode* snode) {
119 WebIntentServiceData service; 119 webkit_glue::WebIntentServiceData service;
120 service.service_url = GURL(snode->ServiceUrl()); 120 service.service_url = GURL(snode->ServiceUrl());
121 service.action = snode->Action(); 121 service.action = snode->Action();
122 string16 stype; 122 string16 stype;
123 if (snode->Types().GetString(0, &stype)) { 123 if (snode->Types().GetString(0, &stype)) {
124 service.type = stype; // Really need to iterate here. 124 service.type = stype; // Really need to iterate here.
125 } 125 }
126 service.title = snode->ServiceName(); 126 service.title = snode->ServiceName();
127 LOG(INFO) << "Removing service " << snode->ServiceName() 127 LOG(INFO) << "Removing service " << snode->ServiceName()
128 << " " << snode->ServiceUrl(); 128 << " " << snode->ServiceUrl();
129 web_intents_registry_->UnregisterIntentProvider(service); 129 web_intents_registry_->UnregisterIntentProvider(service);
(...skipping 23 matching lines...) Expand all
153 children); 153 children);
154 154
155 ListValue args; 155 ListValue args;
156 args.Append(parent == intents_tree_model_->GetRoot() ? 156 args.Append(parent == intents_tree_model_->GetRoot() ?
157 Value::CreateNullValue() : 157 Value::CreateNullValue() :
158 Value::CreateStringValue(intents_tree_model_->GetTreeNodeId(parent))); 158 Value::CreateStringValue(intents_tree_model_->GetTreeNodeId(parent)));
159 args.Append(children); 159 args.Append(children);
160 160
161 web_ui_->CallJavascriptFunction("IntentsView.loadChildren", args); 161 web_ui_->CallJavascriptFunction("IntentsView.loadChildren", args);
162 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/intents/web_intents_model_unittest.cc ('k') | chrome/browser/webdata/web_data_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698