| 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/intents/web_intents_model.h" | 5 #include "chrome/browser/ui/intents/web_intents_model.h" |
| 6 |
| 6 #include "base/string_split.h" | 7 #include "base/string_split.h" |
| 7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 8 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 9 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/intents/default_web_intent_service.h" | |
| 11 #include "chrome/browser/intents/web_intents_registry.h" | 11 #include "chrome/browser/intents/web_intents_registry.h" |
| 12 | 12 |
| 13 WebIntentsTreeNode::WebIntentsTreeNode() | 13 WebIntentsTreeNode::WebIntentsTreeNode() |
| 14 : ui::TreeNode<WebIntentsTreeNode>(string16()), | 14 : ui::TreeNode<WebIntentsTreeNode>(string16()), |
| 15 type_(TYPE_ROOT) {} | 15 type_(TYPE_ROOT) {} |
| 16 | 16 |
| 17 WebIntentsTreeNode::WebIntentsTreeNode(const string16& title) | 17 WebIntentsTreeNode::WebIntentsTreeNode(const string16& title) |
| 18 : ui::TreeNode<WebIntentsTreeNode>(title), | 18 : ui::TreeNode<WebIntentsTreeNode>(title), |
| 19 type_(TYPE_ORIGIN) {} | 19 type_(TYPE_ORIGIN) {} |
| 20 | 20 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 void WebIntentsModel::NotifyObserverEndBatch() { | 167 void WebIntentsModel::NotifyObserverEndBatch() { |
| 168 // Only notify the observers if this is the outermost call to EndBatch() if | 168 // Only notify the observers if this is the outermost call to EndBatch() if |
| 169 // called in a nested manner. | 169 // called in a nested manner. |
| 170 if (--batch_update_ == 0) { | 170 if (--batch_update_ == 0) { |
| 171 FOR_EACH_OBSERVER(Observer, | 171 FOR_EACH_OBSERVER(Observer, |
| 172 intents_observer_list_, | 172 intents_observer_list_, |
| 173 TreeModelEndBatch(this)); | 173 TreeModelEndBatch(this)); |
| 174 } | 174 } |
| 175 } | 175 } |
| OLD | NEW |