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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/cookies_tree_controller_bridge.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRIDGE_ H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRIDGE_ H_
6 #define CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRIDGE_ H_ 6 #define CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRIDGE_ H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/browsing_data/cookies_tree_model.h" 11 #include "chrome/browser/browsing_data/cookies_tree_model.h"
12 #import "chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h" 12 #import "chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h"
13 13
14 class CookiesTreeControllerBridge : public ui::TreeModelObserver { 14 class CookiesTreeControllerBridge : public ui::TreeModelObserver {
15 public: 15 public:
16 explicit CookiesTreeControllerBridge(CookiesTreeModel* model); 16 explicit CookiesTreeControllerBridge(CookiesTreeModel* model);
17 virtual ~CookiesTreeControllerBridge(); 17 ~CookiesTreeControllerBridge() override;
18 18
19 // TreeModelObserver: 19 // TreeModelObserver:
20 virtual void TreeNodesAdded(ui::TreeModel* model, 20 void TreeNodesAdded(ui::TreeModel* model,
21 ui::TreeModelNode* parent, 21 ui::TreeModelNode* parent,
22 int start, 22 int start,
23 int count) override; 23 int count) override;
24 virtual void TreeNodesRemoved(ui::TreeModel* model, 24 void TreeNodesRemoved(ui::TreeModel* model,
25 ui::TreeModelNode* parent, 25 ui::TreeModelNode* parent,
26 int start, 26 int start,
27 int count) override; 27 int count) override;
28 virtual void TreeNodeChanged(ui::TreeModel* model, 28 void TreeNodeChanged(ui::TreeModel* model, ui::TreeModelNode* node) override;
29 ui::TreeModelNode* node) override;
30 29
31 CocoaCookieTreeNode* cocoa_model() const { return cocoa_model_.get(); } 30 CocoaCookieTreeNode* cocoa_model() const { return cocoa_model_.get(); }
32 31
33 private: 32 private:
34 // Creates a CocoaCookieTreeNode from a platform-independent one. 33 // Creates a CocoaCookieTreeNode from a platform-independent one.
35 // Return value is autoreleased. This creates child nodes recusively. 34 // Return value is autoreleased. This creates child nodes recusively.
36 CocoaCookieTreeNode* CocoaNodeFromTreeNode(ui::TreeModelNode* node); 35 CocoaCookieTreeNode* CocoaNodeFromTreeNode(ui::TreeModelNode* node);
37 36
38 // Finds the Cocoa model node based on a platform-independent one. This is 37 // Finds the Cocoa model node based on a platform-independent one. This is
39 // done by comparing the treeNode pointers. |start| is the node to start 38 // done by comparing the treeNode pointers. |start| is the node to start
40 // searching at. If |start| is nil, the root is used. 39 // searching at. If |start| is nil, the root is used.
41 CocoaCookieTreeNode* FindCocoaNode(ui::TreeModelNode* node, 40 CocoaCookieTreeNode* FindCocoaNode(ui::TreeModelNode* node,
42 CocoaCookieTreeNode* start); 41 CocoaCookieTreeNode* start);
43 42
44 // The C++ model that this observes. 43 // The C++ model that this observes.
45 CookiesTreeModel* model_; // weak 44 CookiesTreeModel* model_; // weak
46 45
47 // A copy of the model using Cocoa objects instead of C++ ones. 46 // A copy of the model using Cocoa objects instead of C++ ones.
48 base::scoped_nsobject<CocoaCookieTreeNode> cocoa_model_; 47 base::scoped_nsobject<CocoaCookieTreeNode> cocoa_model_;
49 }; 48 };
50 49
51 #endif // CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRID GE_H_ 50 #endif // CHROME_BROWSER_UI_COCOA_CONTENT_SETTINGS_COOKIES_TREE_CONTROLLER_BRID GE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698