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

Side by Side Diff: extensions/shell/renderer/shell_extensions_renderer_client.cc

Issue 2909673003: [Extensions Bindings] Request JS execution from messaging bindings (Closed)
Patch Set: lazyboy's Created 3 years, 6 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
« no previous file with comments | « extensions/shell/renderer/shell_extensions_renderer_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/renderer/shell_extensions_renderer_client.h" 5 #include "extensions/shell/renderer/shell_extensions_renderer_client.h"
6 6
7 #include "base/memory/ptr_util.h"
8 #include "extensions/renderer/dispatcher.h"
9 #include "extensions/renderer/dispatcher_delegate.h"
10
7 namespace extensions { 11 namespace extensions {
8 12
9 ShellExtensionsRendererClient::ShellExtensionsRendererClient() { 13 ShellExtensionsRendererClient::ShellExtensionsRendererClient()
10 } 14 : dispatcher_delegate_(base::MakeUnique<DispatcherDelegate>()),
15 dispatcher_(base::MakeUnique<Dispatcher>(dispatcher_delegate_.get())) {}
11 16
12 ShellExtensionsRendererClient::~ShellExtensionsRendererClient() { 17 ShellExtensionsRendererClient::~ShellExtensionsRendererClient() {
13 } 18 }
14 19
15 bool ShellExtensionsRendererClient::IsIncognitoProcess() const { 20 bool ShellExtensionsRendererClient::IsIncognitoProcess() const {
16 // app_shell doesn't support off-the-record contexts. 21 // app_shell doesn't support off-the-record contexts.
17 return false; 22 return false;
18 } 23 }
19 24
20 int ShellExtensionsRendererClient::GetLowestIsolatedWorldId() const { 25 int ShellExtensionsRendererClient::GetLowestIsolatedWorldId() const {
21 // app_shell doesn't need to reserve world IDs for anything other than 26 // app_shell doesn't need to reserve world IDs for anything other than
22 // extensions, so we always return 1. Note that 0 is reserved for the global 27 // extensions, so we always return 1. Note that 0 is reserved for the global
23 // world. 28 // world.
24 return 1; 29 return 1;
25 } 30 }
26 31
32 Dispatcher* ShellExtensionsRendererClient::GetDispatcher() {
33 return dispatcher_.get();
34 }
35
27 } // namespace extensions 36 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/renderer/shell_extensions_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698