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

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

Issue 10896032: HTML titlebars for v2 apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kludge test fix for mac Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 #include "chrome/renderer/extensions/dispatcher.h" 5 #include "chrome/renderer/extensions/dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS); 664 source_map_.RegisterSource("ttsEngine", IDR_TTS_ENGINE_CUSTOM_BINDINGS_JS);
665 source_map_.RegisterSource("types", IDR_TYPES_CUSTOM_BINDINGS_JS); 665 source_map_.RegisterSource("types", IDR_TYPES_CUSTOM_BINDINGS_JS);
666 source_map_.RegisterSource("webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS); 666 source_map_.RegisterSource("webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS);
667 source_map_.RegisterSource("webRequestInternal", 667 source_map_.RegisterSource("webRequestInternal",
668 IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS); 668 IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS);
669 source_map_.RegisterSource("webstore", IDR_WEBSTORE_CUSTOM_BINDINGS_JS); 669 source_map_.RegisterSource("webstore", IDR_WEBSTORE_CUSTOM_BINDINGS_JS);
670 670
671 // Platform app sources that are not API-specific.. 671 // Platform app sources that are not API-specific..
672 source_map_.RegisterSource("browserTag", IDR_BROWSER_TAG_JS); 672 source_map_.RegisterSource("browserTag", IDR_BROWSER_TAG_JS);
673 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS); 673 source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS);
674 source_map_.RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS);
674 } 675 }
675 676
676 void Dispatcher::PopulateLazyBindingsMap() { 677 void Dispatcher::PopulateLazyBindingsMap() {
677 lazy_bindings_map_["app"] = InstallAppBindings; 678 lazy_bindings_map_["app"] = InstallAppBindings;
678 lazy_bindings_map_["webstore"] = InstallWebstoreBindings; 679 lazy_bindings_map_["webstore"] = InstallWebstoreBindings;
679 } 680 }
680 681
681 void Dispatcher::InstallBindings(ModuleSystem* module_system, 682 void Dispatcher::InstallBindings(ModuleSystem* module_system,
682 v8::Handle<v8::Context> v8_context, 683 v8::Handle<v8::Context> v8_context,
683 const std::string& api) { 684 const std::string& api) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 // we should abort. 1093 // we should abort.
1093 WebKit::WebFrame* frame = context->web_frame(); 1094 WebKit::WebFrame* frame = context->web_frame();
1094 ExtensionURLInfo url_info(frame->document().securityOrigin(), 1095 ExtensionURLInfo url_info(frame->document().securityOrigin(),
1095 UserScriptSlave::GetDataSourceURLForFrame(frame)); 1096 UserScriptSlave::GetDataSourceURLForFrame(frame));
1096 CHECK(!extensions_.IsSandboxedPage(url_info)); 1097 CHECK(!extensions_.IsSandboxedPage(url_info));
1097 1098
1098 return true; 1099 return true;
1099 } 1100 }
1100 1101
1101 } // namespace extensions 1102 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.h ('k') | chrome/renderer/extensions/module_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698