• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h"
6 
7 #include "base/lazy_instance.h"
8 #include "chrome/renderer/chrome_render_process_observer.h"
9 #include "chrome/renderer/isolated_world_ids.h"
10 
ChromeExtensionsRendererClient()11 ChromeExtensionsRendererClient::ChromeExtensionsRendererClient() {}
12 
~ChromeExtensionsRendererClient()13 ChromeExtensionsRendererClient::~ChromeExtensionsRendererClient() {}
14 
15 // static
GetInstance()16 ChromeExtensionsRendererClient* ChromeExtensionsRendererClient::GetInstance() {
17   static base::LazyInstance<ChromeExtensionsRendererClient> client =
18       LAZY_INSTANCE_INITIALIZER;
19   return client.Pointer();
20 }
21 
IsIncognitoProcess() const22 bool ChromeExtensionsRendererClient::IsIncognitoProcess() const {
23   return ChromeRenderProcessObserver::is_incognito_process();
24 }
25 
GetLowestIsolatedWorldId() const26 int ChromeExtensionsRendererClient::GetLowestIsolatedWorldId() const {
27   return chrome::ISOLATED_WORLD_ID_EXTENSIONS;
28 }
29