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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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) 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/chrome_v8_extension_handler.h" 5 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/renderer/extensions/chrome_v8_context.h" 8 #include "chrome/renderer/extensions/chrome_v8_context.h"
9 #include "content/public/renderer/render_thread.h" 9 #include "content/public/renderer/render_thread.h"
10 10
11 using content::RenderThread; 11 using content::RenderThread;
12 12
13 ChromeV8ExtensionHandler::ChromeV8ExtensionHandler(ChromeV8Context* context) 13 ChromeV8ExtensionHandler::ChromeV8ExtensionHandler(ChromeV8Context* context)
14 : context_(context), routing_id_(MSG_ROUTING_NONE) { 14 : context_(context), routing_id_(MSG_ROUTING_NONE) {
15 } 15 }
16 16
17 ChromeV8ExtensionHandler::~ChromeV8ExtensionHandler() { 17 ChromeV8ExtensionHandler::~ChromeV8ExtensionHandler() {
18 if (routing_id_ != MSG_ROUTING_NONE) 18 if (routing_id_ != MSG_ROUTING_NONE)
19 RenderThread::Get()->RemoveRoute(routing_id_); 19 RenderThread::Get()->RemoveRoute(routing_id_);
20 } 20 }
21 21
22 int ChromeV8ExtensionHandler::GetRoutingId() { 22 int ChromeV8ExtensionHandler::GetRoutingID() {
23 if (routing_id_ == MSG_ROUTING_NONE) { 23 if (routing_id_ == MSG_ROUTING_NONE) {
24 routing_id_ = RenderThread::Get()->GenerateRoutingID(); 24 routing_id_ = RenderThread::Get()->GenerateRoutingID();
25 RenderThread::Get()->AddRoute(routing_id_, this); 25 RenderThread::Get()->AddRoute(routing_id_, this);
26 } 26 }
27 27
28 return routing_id_; 28 return routing_id_;
29 } 29 }
30 30
31 void ChromeV8ExtensionHandler::Send(IPC::Message* message) { 31 void ChromeV8ExtensionHandler::Send(IPC::Message* message) {
32 RenderThread::Get()->Send(message); 32 RenderThread::Get()->Send(message);
33 } 33 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_extension_handler.h ('k') | chrome/renderer/extensions/extension_custom_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698