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

Side by Side Diff: chrome/browser/ui/webui/collected_cookies_ui_delegate.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | 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/collected_cookies_ui_delegate.h" 5 #include "chrome/browser/ui/webui/collected_cookies_ui_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
25 #include "content/browser/tab_contents/tab_contents.h" 25 #include "content/browser/tab_contents/tab_contents.h"
26 #include "content/public/browser/notification_source.h" 26 #include "content/public/browser/notification_source.h"
27 #include "grit/browser_resources.h" 27 #include "grit/browser_resources.h"
28 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
29 #include "ui/base/l10n/l10n_util.h" 29 #include "ui/base/l10n/l10n_util.h"
30 #include "ui/base/resource/resource_bundle.h" 30 #include "ui/base/resource/resource_bundle.h"
31 #include "ui/gfx/size.h" 31 #include "ui/gfx/size.h"
32 32
33 using content::WebUIMessageHandler;
34
33 namespace { 35 namespace {
34 36
35 // TODO(xiyuan): Localize this. 37 // TODO(xiyuan): Localize this.
36 const int kDialogWidth = 480; 38 const int kDialogWidth = 480;
37 const int kDialogHeight = 470; 39 const int kDialogHeight = 470;
38 40
39 CookieTreeOriginNode* GetOriginNode(CookiesTreeModel* model, 41 CookieTreeOriginNode* GetOriginNode(CookiesTreeModel* model,
40 const std::string& node_path) { 42 const std::string& node_path) {
41 CookieTreeNode* node = cookies_tree_model_util::GetTreeNodeFromPath( 43 CookieTreeNode* node = cookies_tree_model_util::GetTreeNodeFromPath(
42 model->GetRoot(), node_path); 44 model->GetRoot(), node_path);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (!args->GetString(0, &node_path)) 299 if (!args->GetString(0, &node_path))
298 return; 300 return;
299 301
300 CookieTreeOriginNode* origin_node = GetOriginNode( 302 CookieTreeOriginNode* origin_node = GetOriginNode(
301 blocked_cookies_tree_model_.get(), node_path); 303 blocked_cookies_tree_model_.get(), node_path);
302 if (!origin_node) 304 if (!origin_node)
303 return; 305 return;
304 306
305 AddContentException(origin_node, CONTENT_SETTING_SESSION_ONLY); 307 AddContentException(origin_node, CONTENT_SETTING_SESSION_ONLY);
306 } 308 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/collected_cookies_ui_delegate.h ('k') | chrome/browser/ui/webui/conflicts_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698