コード例 #1
0
  def __init__(self, backend, platform_backend, credentials_path):
    super(Browser, self).__init__(app_backend=backend,
                                  platform_backend=platform_backend)
    self._browser_backend = backend
    self._platform_backend = platform_backend
    self._local_server_controller = local_server.LocalServerController(
        platform_backend)
    self._tabs = tab_list.TabList(backend.tab_list_backend)
    self.credentials = browser_credentials.BrowserCredentials()
    self.credentials.credentials_path = credentials_path
    self._platform_backend.DidCreateBrowser(self, self._browser_backend)

    browser_options = self._browser_backend.browser_options
    self.platform.FlushDnsCache()
    if browser_options.clear_sytem_cache_for_browser_and_profile_on_start:
      if self.platform.CanFlushIndividualFilesFromSystemCache():
        self.platform.FlushSystemCacheForDirectory(
            self._browser_backend.profile_directory)
        self.platform.FlushSystemCacheForDirectory(
            self._browser_backend.browser_directory)
      else:
        self.platform.FlushEntireSystemCache()

    self._browser_backend.SetBrowser(self)
    self._browser_backend.Start()
    self._platform_backend.DidStartBrowser(self, self._browser_backend)
    self._profiling_controller = profiling_controller.ProfilingController(
        self._browser_backend.profiling_controller_backend)
コード例 #2
0
    def __init__(self, backend, platform_backend, archive_path,
                 append_to_existing_wpr, make_javascript_deterministic,
                 credentials_path):
        assert platform_backend.platform != None

        self._browser_backend = backend
        self._platform_backend = platform_backend
        self._wpr_server = None
        self._local_server_controller = local_server.LocalServerController(
            backend)
        self._tabs = tab_list.TabList(backend.tab_list_backend)
        self.credentials = browser_credentials.BrowserCredentials()
        self.credentials.credentials_path = credentials_path
        self._platform_backend.DidCreateBrowser(self, self._browser_backend)

        self.SetReplayArchivePath(archive_path, append_to_existing_wpr,
                                  make_javascript_deterministic)

        browser_options = self._browser_backend.browser_options
        self.platform.FlushDnsCache()
        if browser_options.clear_sytem_cache_for_browser_and_profile_on_start:
            if self.platform.CanFlushIndividualFilesFromSystemCache():
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.profile_directory)
                self.platform.FlushSystemCacheForDirectory(
                    self._browser_backend.browser_directory)
            else:
                self.platform.FlushEntireSystemCache()

        self._browser_backend.SetBrowser(self)
        self._browser_backend.Start()
        self._platform_backend.DidStartBrowser(self, self._browser_backend)
コード例 #3
0
 def __init__(self, platform_backend):
   self._platform_backend = platform_backend
   self._platform_backend.InitPlatformBackend()
   self._platform_backend.SetPlatform(self)
   self._network_controller = network_controller.NetworkController(
       self._platform_backend.network_controller_backend)
   self._tracing_controller = tracing_controller.TracingController(
       self._platform_backend.tracing_controller_backend)
   self._local_server_controller = local_server.LocalServerController(
       self._platform_backend)
   self._is_monitoring_power = False
コード例 #4
0
ファイル: browser.py プロジェクト: hokein/chromium
 def __init__(self, backend, platform_backend):
     self._browser_backend = backend
     self._http_server = None
     self._wpr_server = None
     self._platform_backend = platform_backend
     self._active_profilers = []
     self._profilers_states = {}
     self._local_server_controller = local_server.LocalServerController(
         backend)
     self._tabs = tab_list.TabList(backend.tab_list_backend)
     self.credentials = browser_credentials.BrowserCredentials()
     self.platform.SetFullPerformanceModeEnabled(True)
コード例 #5
0
ファイル: browser.py プロジェクト: sencha/chromium-spacewalk
  def __init__(self, backend, platform_backend):
    assert platform_backend.platform != None

    self._browser_backend = backend
    self._platform_backend = platform_backend
    self._wpr_server = None
    self._active_profilers = []
    self._profilers_states = {}
    self._local_server_controller = local_server.LocalServerController(backend)
    self._tabs = tab_list.TabList(backend.tab_list_backend)
    self.credentials = browser_credentials.BrowserCredentials()

    self._platform_backend.DidCreateBrowser(self, self._browser_backend)