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

Side by Side Diff: chrome/renderer/extensions/schema_generated_bindings.cc

Issue 9006027: Rip Out the Sidebar API (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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/renderer/extensions/schema_generated_bindings.h" 5 #include "chrome/renderer/extensions/schema_generated_bindings.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 604
605 // Construct the Value object. 605 // Construct the Value object.
606 IPC::Message bitmap_pickle; 606 IPC::Message bitmap_pickle;
607 IPC::WriteParam(&bitmap_pickle, bitmap); 607 IPC::WriteParam(&bitmap_pickle, bitmap);
608 *bitmap_value = base::BinaryValue::CreateWithCopiedBuffer( 608 *bitmap_value = base::BinaryValue::CreateWithCopiedBuffer(
609 static_cast<const char*>(bitmap_pickle.data()), bitmap_pickle.size()); 609 static_cast<const char*>(bitmap_pickle.data()), bitmap_pickle.size());
610 610
611 return true; 611 return true;
612 } 612 }
613 613
614 // A special request for setting the extension action icon and the sidebar 614 // A special request for setting the extension action icon. This function
615 // mini tab icon. This function accepts a canvas ImageData object, so it needs 615 // accepts a canvas ImageData object, so it needs to do extra processing
616 // to do extra processing before sending the request to the browser. 616 // before sending the request to the browser.
617 static v8::Handle<v8::Value> SetIconCommon( 617 static v8::Handle<v8::Value> SetIconCommon(
618 const v8::Arguments& args) { 618 const v8::Arguments& args) {
619 Value* bitmap_value = NULL; 619 Value* bitmap_value = NULL;
620 if (!ConvertImageDataToBitmapValue(args, &bitmap_value)) 620 if (!ConvertImageDataToBitmapValue(args, &bitmap_value))
621 return v8::Undefined(); 621 return v8::Undefined();
622 622
623 v8::Local<v8::Object> extension_args = args[1]->ToObject(); 623 v8::Local<v8::Object> extension_args = args[1]->ToObject();
624 v8::Local<v8::Object> details = 624 v8::Local<v8::Object> details =
625 extension_args->Get(v8::String::New("0"))->ToObject(); 625 extension_args->Get(v8::String::New("0"))->ToObject();
626 626
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 const std::string& extension_id) { 719 const std::string& extension_id) {
720 for (PendingRequestMap::const_iterator it = g_pending_requests.Get().begin(); 720 for (PendingRequestMap::const_iterator it = g_pending_requests.Get().begin();
721 it != g_pending_requests.Get().end(); ++it) { 721 it != g_pending_requests.Get().end(); ++it) {
722 if (it->second->extension_id == extension_id) 722 if (it->second->extension_id == extension_id)
723 return true; 723 return true;
724 } 724 }
725 return false; 725 return false;
726 } 726 }
727 727
728 } // namespace 728 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698