OLD | NEW |
1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/cookies_tree_model.h" | 11 #include "chrome/browser/cookies_tree_model.h" |
12 #include "chrome/browser/ui/webui/options2/options_ui2.h" | 12 #include "chrome/browser/ui/webui/options2/options_ui2.h" |
13 | 13 |
| 14 class CookiesTreeModelUtil; |
| 15 |
14 namespace options2 { | 16 namespace options2 { |
15 | 17 |
16 class CookiesViewHandler : public OptionsPageUIHandler, | 18 class CookiesViewHandler : public OptionsPageUIHandler, |
17 public CookiesTreeModel::Observer { | 19 public CookiesTreeModel::Observer { |
18 public: | 20 public: |
19 CookiesViewHandler(); | 21 CookiesViewHandler(); |
20 virtual ~CookiesViewHandler(); | 22 virtual ~CookiesViewHandler(); |
21 | 23 |
22 // OptionsPageUIHandler implementation. | 24 // OptionsPageUIHandler implementation. |
23 virtual void GetLocalizedValues( | 25 virtual void GetLocalizedValues( |
(...skipping 26 matching lines...) Expand all Loading... |
50 | 52 |
51 // Remove selected sites data. | 53 // Remove selected sites data. |
52 void Remove(const base::ListValue* args); | 54 void Remove(const base::ListValue* args); |
53 | 55 |
54 // Get the tree node using the tree path info in |args| and call | 56 // Get the tree node using the tree path info in |args| and call |
55 // SendChildren to pass back children nodes data to WebUI. | 57 // SendChildren to pass back children nodes data to WebUI. |
56 void LoadChildren(const base::ListValue* args); | 58 void LoadChildren(const base::ListValue* args); |
57 | 59 |
58 // Get children nodes data and pass it to 'CookiesView.loadChildren' to | 60 // Get children nodes data and pass it to 'CookiesView.loadChildren' to |
59 // update the WebUI. | 61 // update the WebUI. |
60 void SendChildren(CookieTreeNode* parent); | 62 void SendChildren(const CookieTreeNode* parent); |
61 | 63 |
62 // The Cookies Tree model | 64 // The Cookies Tree model |
63 scoped_ptr<CookiesTreeModel> cookies_tree_model_; | 65 scoped_ptr<CookiesTreeModel> cookies_tree_model_; |
64 | 66 |
65 // Flag to indicate whether there is a batch update in progress. | 67 // Flag to indicate whether there is a batch update in progress. |
66 bool batch_update_; | 68 bool batch_update_; |
67 | 69 |
| 70 scoped_ptr<CookiesTreeModelUtil> model_util_; |
| 71 |
68 DISALLOW_COPY_AND_ASSIGN(CookiesViewHandler); | 72 DISALLOW_COPY_AND_ASSIGN(CookiesViewHandler); |
69 }; | 73 }; |
70 | 74 |
71 } // namespace options2 | 75 } // namespace options2 |
72 | 76 |
73 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ | 77 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_COOKIES_VIEW_HANDLER2_H_ |
OLD | NEW |