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

Side by Side Diff: chrome/browser/extensions/extension_bookmark_manager_api.cc

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 3 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/extensions/extension_bookmark_manager_api.h" 5 #include "chrome/browser/extensions/extension_bookmark_manager_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 void ExtensionBookmarkManagerEventRouter::DispatchEvent(const char* event_name, 156 void ExtensionBookmarkManagerEventRouter::DispatchEvent(const char* event_name,
157 const ListValue* args) { 157 const ListValue* args) {
158 if (!profile_->GetExtensionMessageService()) 158 if (!profile_->GetExtensionMessageService())
159 return; 159 return;
160 160
161 std::string json_args; 161 std::string json_args;
162 base::JSONWriter::Write(args, false, &json_args); 162 base::JSONWriter::Write(args, false, &json_args);
163 profile_->GetExtensionMessageService()->DispatchEventToRenderers( 163 profile_->GetExtensionMessageService()->DispatchEventToRenderers(
164 event_name, json_args, profile_->IsOffTheRecord(), GURL()); 164 event_name, json_args, profile_, GURL());
165 } 165 }
166 166
167 void ExtensionBookmarkManagerEventRouter::DispatchDragEvent( 167 void ExtensionBookmarkManagerEventRouter::DispatchDragEvent(
168 const BookmarkDragData& data, const char* event_name) { 168 const BookmarkDragData& data, const char* event_name) {
169 if (data.size() == 0) 169 if (data.size() == 0)
170 return; 170 return;
171 171
172 ListValue args; 172 ListValue args;
173 BookmarkDragDataToJSON(profile_, data, &args); 173 BookmarkDragDataToJSON(profile_, data, &args);
174 DispatchEvent(event_name, &args); 174 DispatchEvent(event_name, &args);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (folders_only) { 431 if (folders_only) {
432 extension_bookmark_helpers::AddNodeFoldersOnly(node, 432 extension_bookmark_helpers::AddNodeFoldersOnly(node,
433 json.get(), 433 json.get(),
434 true); 434 true);
435 } else { 435 } else {
436 extension_bookmark_helpers::AddNode(node, json.get(), true); 436 extension_bookmark_helpers::AddNode(node, json.get(), true);
437 } 437 }
438 result_.reset(json.release()); 438 result_.reset(json.release());
439 return true; 439 return true;
440 } 440 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/browser/extensions/extension_bookmarks_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698