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

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

Issue 7621032: Initial inline web store install bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 9 years, 4 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/renderer/extensions/extension_helper.h" 5 #include "chrome/renderer/extensions/extension_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return false; 95 return false;
96 } 96 }
97 97
98 app_definition_fetcher_.reset(new ResourceFetcher( 98 app_definition_fetcher_.reset(new ResourceFetcher(
99 pending_app_info_->manifest_url, render_view()->webview()->mainFrame(), 99 pending_app_info_->manifest_url, render_view()->webview()->mainFrame(),
100 WebURLRequest::TargetIsSubresource, 100 WebURLRequest::TargetIsSubresource,
101 NewCallback(this, &ExtensionHelper::DidDownloadApplicationDefinition))); 101 NewCallback(this, &ExtensionHelper::DidDownloadApplicationDefinition)));
102 return true; 102 return true;
103 } 103 }
104 104
105 void ExtensionHelper::InlineWebstoreInstall(std::string webstore_item_id) {
106 Send(new ExtensionHostMsg_InlineWebstoreInstall(
107 routing_id(), webstore_item_id));
108 }
109
105 bool ExtensionHelper::OnMessageReceived(const IPC::Message& message) { 110 bool ExtensionHelper::OnMessageReceived(const IPC::Message& message) {
106 bool handled = true; 111 bool handled = true;
107 IPC_BEGIN_MESSAGE_MAP(ExtensionHelper, message) 112 IPC_BEGIN_MESSAGE_MAP(ExtensionHelper, message)
108 IPC_MESSAGE_HANDLER(ExtensionMsg_Response, OnExtensionResponse) 113 IPC_MESSAGE_HANDLER(ExtensionMsg_Response, OnExtensionResponse)
109 IPC_MESSAGE_HANDLER(ExtensionMsg_MessageInvoke, OnExtensionMessageInvoke) 114 IPC_MESSAGE_HANDLER(ExtensionMsg_MessageInvoke, OnExtensionMessageInvoke)
110 IPC_MESSAGE_HANDLER(ExtensionMsg_ExecuteCode, OnExecuteCode) 115 IPC_MESSAGE_HANDLER(ExtensionMsg_ExecuteCode, OnExecuteCode)
111 IPC_MESSAGE_HANDLER(ExtensionMsg_GetApplicationInfo, OnGetApplicationInfo) 116 IPC_MESSAGE_HANDLER(ExtensionMsg_GetApplicationInfo, OnGetApplicationInfo)
112 IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId, 117 IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId,
113 OnUpdateBrowserWindowId) 118 OnUpdateBrowserWindowId)
114 IPC_MESSAGE_HANDLER(ExtensionMsg_NotifyRenderViewType, 119 IPC_MESSAGE_HANDLER(ExtensionMsg_NotifyRenderViewType,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 routing_id(), *pending_app_info_)); 332 routing_id(), *pending_app_info_));
328 pending_app_info_.reset(NULL); 333 pending_app_info_.reset(NULL);
329 } 334 }
330 335
331 void ExtensionHelper::AddErrorToRootConsole(const string16& message) { 336 void ExtensionHelper::AddErrorToRootConsole(const string16& message) {
332 if (render_view()->webview() && render_view()->webview()->mainFrame()) { 337 if (render_view()->webview() && render_view()->webview()->mainFrame()) {
333 render_view()->webview()->mainFrame()->addMessageToConsole( 338 render_view()->webview()->mainFrame()->addMessageToConsole(
334 WebConsoleMessage(WebConsoleMessage::LevelError, message)); 339 WebConsoleMessage(WebConsoleMessage::LevelError, message));
335 } 340 }
336 } 341 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698