0
Commit Graph

43 Commits

Author SHA1 Message Date
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Dave Tapuska
327c06c9c7 Rename GetMainFrame to GetPrimaryMainFrame
Progressively rename some usages of GetMainFrame to GetPrimaryMainFrame.

This is an automated change via git grep & sed.

BUG=1250404

Change-Id: I5e8fda4f11104cf9fcde8a690a33dc6ab7c34f3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3696741
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1013636}
2022-06-13 20:31:51 +00:00
Xiaohan Wang
1ecfd006fd content: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ia0eae6f9396065e190929d42600012c9324c07e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3399774
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Owners-Override: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961157}
2022-01-19 22:33:10 +00:00
Avi Drissman
7c57be77a7 Migrate to OS_MAC and OS_APPLE in content
Because content is not used by iOS, this migrates
 defined(OS_MACOSX) -> defined(OS_MAC)

Bug: 1105907
Change-Id: Ibf85273fea9c5566594ca00f2589b890515be6c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321210
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792842}
2020-07-29 20:09:46 +00:00
Peter Kasting
919ce657e4 Add missing #includes of browser_test.h.
This is a step towards doing full IWYU of browser_test.h, which will
have other benefits.

Completely mechanical and already R+ed as part of r765923.

Tbr: sky
Bug: none
Change-Id: Icb7ab728098a6cf29c0920da4b524e96a7c024c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2186411
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766361}
2020-05-07 10:22:36 +00:00
Balazs Engedy
683d2c7a8f Revert "IWYU for browser_test.h."
This reverts commit 66a53c909a.

Reason for revert: Breaks compile on official branded builders.

Original change's description:
> IWYU for browser_test.h.
> 
> Include this directly in relevant test files.  This lets us convert the
> HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
> view_event_test_base.h into #errors, and force people to not even
> include this file in files that can't use it.
> 
> Bug: none
> Tbr: sky
> Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#765923}

TBR=sky@chromium.org,pkasting@chromium.org,thestig@chromium.org

Change-Id: I4583916602404c310a93f571dd2c78645c6bd567
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2184132
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765931}
2020-05-06 10:36:40 +00:00
Peter Kasting
66a53c909a IWYU for browser_test.h.
Include this directly in relevant test files.  This lets us convert the
HAS_OUT_OF_PROC_TEST_RUNNER checks in this file and
view_event_test_base.h into #errors, and force people to not even
include this file in files that can't use it.

Bug: none
Tbr: sky
Change-Id: I86626099eb047eb53e8b3611de38ba6bebc01a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136117
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765923}
2020-05-06 09:38:56 +00:00
Alex Moshchuk
aeb20fe347 Fix remaining NavigateToURL expectations in content_browsertests.
This is hopefully the last step before finally adding
WARN_UNUSED_RESULT to NavigateToURL().

Apart from adding straightforward expectations for regular and redirect
cases, this fixes a couple more bugs:

- AppendingFrameInWebUIDoesNotCrash was broken on Android, because it
  used chrome://tracing, which doesn't exist on Android.

- A couple of tests in WebContentsImplBrowserTest (e.g.,
  ChangeDisplayMode) were navigating to about://blank (instead of
  about:blank), which results in an error rather than a blank page.

Bug: 425335
Change-Id: Id80040de9c3383c517f2df95b819f314e6b29f30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819852
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699854}
2019-09-25 17:40:01 +00:00
Lukasz Anforowicz
40066f5895 Adding GUARDED_BY annotations to //content/browser.
This CL also fixes a missing lock that was found by the compile-time
analysis in ChildProcessSecurityPolicyImpl::HasPermissionsForFileSystemFile.

Bug: 887645
Change-Id: I940ade66bb2d754669c2b5bd408b63c91a1a8d5a
Reviewed-on: https://chromium-review.googlesource.com/1237145
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593334}
2018-09-21 21:14:41 +00:00
Lukasz Anforowicz
2b26997337 Always keep a spare RenderProcessHost in presence of site-per-process.
This CL adds a feature for always keeping a separate RenderProcessHost
for the most recently used BrowserContext.  The feature is enabled by
default, but only consulted in presence of site-per-process.  Having a
spare renderer should hopefully avoid regressing page load metrics in
cross-site navigations (which before this CL needed to wait in
site-per-process mode until a new process was spawned).

After this CL, MaybeTakeSpareRenderProcessHost won't discard a
mismatched spare when in site-per-process mode (unless over the process
limit).  SpareRenderProcessHostManager::PrepareForFutureRequests method
has also been added - this method is responsible for warming-up another
spare in site-per-process mode.  PrepareForFutureRequests is called
when:
1. The previous spare was taken
   (in RenderProcessHostImpl::GetProcessHostForSiteInstance)
   Note: A new spare is not warmed-up when the previous spare was
         mismatched and not taken to avoid spawning two processes at the
         same time.
2. A navigation redirects into a SiteInstance that needs a new process
   (in NavigationRequest::OnRequestRedirected)
3. A navigation is ready to commit (this handles postponing spawning
   of the spare in the scenario handled in the note of scenario 
   above;  this happens in NavigationRequest::CommitNavigation)
4. A same-site navigation happens (this retains the behavior from before
   the CL that allows discarding of the spare in this scenario;  this
   happens in RenderFrameHostManager::GetSiteInstanceForNavigation)

This CL also ensures that the spare is considered (and potentially
discarded) before considering process reuse because of the process
limit.  The change of the order of operations helps avoid process reuse
in some scenarios.

Remaining changes in this CL update various tests, so they can properly
account for the extra spare renderer.

Bug: 808114
Change-Id: Ica0226c2dc390102789b2c33f6b538c3e27eea82
Tbr: sky@chromium.org, sadrul@chromium.org, pavely@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/963405
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550287}
2018-04-12 18:49:10 +00:00
Wez
0abfbf51fb Remove |wait| parameter from RenderProcessHost::Shutdown() API.
The Shutdown() API was added to RenderProcessHost with parameters
reflecting those of the underlying base::Process::Terminate() API,
which include a synchronous |wait| option.

We never use Shutdown(.., wait=true) in production code, and in tests
we can instead use a RenderProcessHostObserver to wait for a process
to crash or exit, so we can remove the |wait| parameter and simplify
both callers and the implementation.

Bug: 806451
Change-Id: I2aeae32a3d20488b4970cf96959eaa287642b7ed
Reviewed-on: https://chromium-review.googlesource.com/936450
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540713}
2018-03-03 01:54:45 +00:00
Lukasz Anforowicz
9e0ce4ed78 Removing callers of the WebContents::GetRenderProcessHost() method.
WebContents::GetRenderProcessHost is an API that doesn't behave as
expected with out-of-process iframes, as multiple processes can be
associated with a single WebContents.  This CL replaces callers of this
API, so that they go through an equivalent API that explicitly selects
which frame's process is needed.

This CL was started by using an ad-hoc clang-plugin that replaced
existing callsites of WebContents::GetRenderProcessHost() with a call to
something like wc->GetMainFrame()->GetProcess().  This was followed-up
by manually adding an include of render_frame_host.h and git cl format
and git cl lint and then a self-review with small tweaks (e.g. sometimes
using a wc->GetRenderViewHost()->GetProcess() is more appropriate).

This CL was uploaded by git cl split.

R=boliu@chromium.org

Bug: 666525
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I13380dbc5c3339e7b7acdd28c574517b668d4cf2
Reviewed-on: https://chromium-review.googlesource.com/689026
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505111}
2017-09-28 19:09:15 +00:00
Findit
86f6ae0fa5 Revert "Removing WebContents::GetRenderProcessHost() method."
This reverts commit 4229f25c34.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 504862 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzQyMjlmMjVjMzQ3YWE2NGYwMWQ5MzJkZDIzODU2ZTQ0ZWFlNmQ3YTYM

Sample Failed Build: https://luci-milo.appspot.com/buildbot/chromium.win/Win%20x64%20Builder/38179

Original change's description:
> Removing WebContents::GetRenderProcessHost() method.
> 
> WebContents::GetRenderProcessHost is an API that doesn't behave as
> expected with out-of-process iframes, as multiple processes can be
> associated with a single WebContents.  This CL removes this API
> altogether.
> 
> This CL was started by using an ad-hoc clang-plugin that replaced
> existing callsites of WebContents::GetRenderProcessHost() with a call to
> something like wc->GetMainFrame()->GetProcess().  This was followed-up
> by manually adding an include of render_frame_host.h and git cl format
> and git cl lint and then a self-review with small tweaks (e.g. sometimes
> using a wc->GetRenderViewHost()->GetProcess() is more appropriate).
> 
> For the record, below is a list of existing bugs that have been
> uncovered or highlighted during the review of this CL:
> - https://crbug.com/715924: Headless OOPIF support
> - https://crbug.com/767519: Android WebView code duplication
> - https://crbug.com/767526: Handling of unresponsive renderers
> - https://crbug.com/767539: TabSpecificContentSettings
> - https://crbug.com/767557: ExtensionMsg_UpdateTabSpecificPermissions
> - https://crbug.com/767563: chrome.processes.getProcessIdForTab
> - https://crbug.com/769385: WebViewInternalAddContentScriptsFunction
> - https://crbug.com/769461: BrowserTag/WebView owner tracking
> - https://crbug.com/769479: PrintPreviewDialogController
> 
> Bug: 666525
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: Idcb70a8c3928f0631a38a61b7029876fdaf921cb
> Tbr: alokp@chromium.org, boliu@chromium.org, derat@chromium.org, dvallet@chromium.org, haraken@chromium.org, lazyboy@chromium.org, lfg@chromium.org, raymes@chromium.org, rdsmith@chromium.org, tapted@chromium.org, tedchoc@chromium.org, thestig@chromium.org, treib@chromium.org
> Tbr: asvitkine@chromium.org, bartfab@chromium.org, bengr@chromium.org, benwells@chromium.org, dewittj@chromium.org, dsinclair@chromium.org, jkarlin@chromium.org, jsbell@chromium.org, meacer@chromium.org, mmenke@chromium.org, nparker@chromium.org, sergeyu@chromium.org, sky@chromium.org, stanisc@chromium.org, tommycli@chromium.org, wjmaclean@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/673124
> Reviewed-by: Justin DeWitt <dewittj@chromium.org>
> Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
> Reviewed-by: Stanislav Chiknavaryan <stanisc@chromium.org>
> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
> Reviewed-by: Nathan Parker <nparker@chromium.org>
> Reviewed-by: David Vallet <dvallet@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Lucas Gadani <lfg@chromium.org>
> Reviewed-by: Bo <boliu@chromium.org>
> Reviewed-by: Dan Erat <derat@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Nick Carter <nick@chromium.org>
> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#504862}

Change-Id: I389fcfe03f5ed41366855d1340f767d89592408c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 666525
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/688759
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504868}
2017-09-28 02:19:01 +00:00
Lukasz Anforowicz
4229f25c34 Removing WebContents::GetRenderProcessHost() method.
WebContents::GetRenderProcessHost is an API that doesn't behave as
expected with out-of-process iframes, as multiple processes can be
associated with a single WebContents.  This CL removes this API
altogether.

This CL was started by using an ad-hoc clang-plugin that replaced
existing callsites of WebContents::GetRenderProcessHost() with a call to
something like wc->GetMainFrame()->GetProcess().  This was followed-up
by manually adding an include of render_frame_host.h and git cl format
and git cl lint and then a self-review with small tweaks (e.g. sometimes
using a wc->GetRenderViewHost()->GetProcess() is more appropriate).

For the record, below is a list of existing bugs that have been
uncovered or highlighted during the review of this CL:
- https://crbug.com/715924: Headless OOPIF support
- https://crbug.com/767519: Android WebView code duplication
- https://crbug.com/767526: Handling of unresponsive renderers
- https://crbug.com/767539: TabSpecificContentSettings
- https://crbug.com/767557: ExtensionMsg_UpdateTabSpecificPermissions
- https://crbug.com/767563: chrome.processes.getProcessIdForTab
- https://crbug.com/769385: WebViewInternalAddContentScriptsFunction
- https://crbug.com/769461: BrowserTag/WebView owner tracking
- https://crbug.com/769479: PrintPreviewDialogController

Bug: 666525
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Idcb70a8c3928f0631a38a61b7029876fdaf921cb
Tbr: alokp@chromium.org, boliu@chromium.org, derat@chromium.org, dvallet@chromium.org, haraken@chromium.org, lazyboy@chromium.org, lfg@chromium.org, raymes@chromium.org, rdsmith@chromium.org, tapted@chromium.org, tedchoc@chromium.org, thestig@chromium.org, treib@chromium.org
Tbr: asvitkine@chromium.org, bartfab@chromium.org, bengr@chromium.org, benwells@chromium.org, dewittj@chromium.org, dsinclair@chromium.org, jkarlin@chromium.org, jsbell@chromium.org, meacer@chromium.org, mmenke@chromium.org, nparker@chromium.org, sergeyu@chromium.org, sky@chromium.org, stanisc@chromium.org, tommycli@chromium.org, wjmaclean@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/673124
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Stanislav Chiknavaryan <stanisc@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Nathan Parker <nparker@chromium.org>
Reviewed-by: David Vallet <dvallet@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nick Carter <nick@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504862}
2017-09-28 01:47:46 +00:00
toyoshim
6142d96f15 NavigationController: Reload methods migration
Use the new Reload() method with a ReloadType from everywhere, and
remove old Reload*() methods.

BUG=670232
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
TBR=bajones@chromium.org, jam@chromium.org

Review-Url: https://codereview.chromium.org/2561983002
Cr-Commit-Position: refs/heads/master@{#439439}
2016-12-19 09:11:51 +00:00
avi
b7348940d3 Switch to standard integer types in content/browser/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1549113002

Cr-Commit-Position: refs/heads/master@{#366868}
2015-12-25 20:58:00 +00:00
jaekyun
37e572a3b6 Use StopChildProcess instead of base::KillProcess to kill a renderer process
base::KillProcess doesn't work on android because a renderer process is running as an isolated process.
So we need to use StopChildProcess to kill it.

BUG=433068

Review URL: https://codereview.chromium.org/740813004

Cr-Commit-Position: refs/heads/master@{#306931}
2014-12-04 23:34:12 +00:00
dcheng
fa85b15991 Standardize usage of virtual/override/final specifiers.
The Google C++ style guide states:

  Explicitly annotate overrides of virtual functions or virtual
  destructors with an override or (less frequently) final specifier.
  Older (pre-C++11) code will use the virtual keyword as an inferior
  alternative annotation. For clarity, use exactly one of override,
  final, or virtual when declaring an override.

To better conform to these guidelines, the following constructs have
been rewritten:

- if a base class has a virtual destructor, then:
    virtual ~Foo();                   ->  ~Foo() override;
- virtual void Foo() override;        ->  void Foo() override;
- virtual void Foo() override final;  ->  void Foo() final;

This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.

BUG=417463
R=nasko@chromium.org

Review URL: https://codereview.chromium.org/678073006

Cr-Commit-Position: refs/heads/master@{#301534}
2014-10-28 01:13:59 +00:00
jam@chromium.org
6e9def1ccf Move ContentBrowserTest class to content/public, since it's used by components_browsertests for browser tests which use Content Shell.
R=avi@chromium.org

Review URL: https://codereview.chromium.org/214823006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259967 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-27 20:23:28 +00:00
jochen@chromium.org
de7d61ff0d [content shell] move browser process stuff into browser/ subdir
BUG=180021
R=marja@chromium.org
TBR=joi@chromium.org,ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23316003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218441 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-20 11:30:41 +00:00
rsesek@chromium.org
fa20e0076d Update include paths in content/browser for base/process changes.
BUG=242290
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/19495006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213225 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-23 21:20:54 +00:00
brettw@chromium.org
57999817d3 Move file_path.h to base/files.
TBR=sky

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-24 05:40:52 +00:00
jam@chromium.org
464883218e Move remaining files in content\browser to the content namespace.
Review URL: https://codereview.chromium.org/11340029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164828 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-30 03:22:20 +00:00
sail@chromium.org
d9c2e51c51 Revert 164120 - content/browser: Move more files into the content namespace.
Fixed most of the files found with the following command line:

$ git grep --files-without-match --name-only "namespace content {" -- content/browser/{*.cc,*.h.*.mm}

R=jam@chromium.org

Review URL: https://codereview.chromium.org/11274038

TBR=tfarina@chromium.org
Review URL: https://codereview.chromium.org/11273049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164122 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-25 18:54:36 +00:00
tfarina@chromium.org
7a91c555f3 content/browser: Move more files into the content namespace.
Fixed most of the files found with the following command line:

$ git grep --files-without-match --name-only "namespace content {" -- content/browser/{*.cc,*.h.*.mm}

R=jam@chromium.org

Review URL: https://codereview.chromium.org/11274038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164120 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-25 18:44:52 +00:00
jam@chromium.org
7ededb8449 Disable ChildProcessSecurityPolicy on debug mac
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148517 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-26 04:50:36 +00:00
jam@chromium.org
4cdc9a2855 Move over a bunch of tests from browser_tests to content_browsertests.
BUG=90448
Review URL: https://chromiumcodereview.appspot.com/10831023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148507 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-26 03:39:31 +00:00
ben@chromium.org
52877dbc6c Move tab functions off Browser into browser_tabstrip and browser_tabrestore.
http://crbug.com/133576
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10702029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145015 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-29 22:22:03 +00:00
avi@chromium.org
3bbacc5b61 TabContents -> WebContentsImpl, part 19.
BUG=105875
TEST=no change


Review URL: http://codereview.chromium.org/10106022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132599 0039d316-1c4b-4281-b951-d872f2087c98
2012-04-17 17:46:15 +00:00
avi@chromium.org
93ddb3c682 TabContents -> WebContentsImpl, part 7.
Move the WebContentsImpl class to files in web_contents.

BUG=105875
TEST=no change


Review URL: http://codereview.chromium.org/10054012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131845 0039d316-1c4b-4281-b951-d872f2087c98
2012-04-11 21:44:29 +00:00
ananta@chromium.org
b953542108 Create a content public browser API around the ChildProcessSecurityPolicy class. The implementation of this
interface lives in content\browser\child_process_security_policy_impl.cc/.h.

Moved some security checks from the TabContentsDelegate implementation (chrome\browser) to the TabContents
code in content.

BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9360014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121137 0039d316-1c4b-4281-b951-d872f2087c98
2012-02-09 01:47:59 +00:00
jam@chromium.org
6acde63532 Replace Browser::GetTabContentsAt with GetWebContentsAt and update all callers.
BUG=98716
TBR=joi
Review URL: http://codereview.chromium.org/9085006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116322 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-04 16:52:20 +00:00
jam@chromium.org
f5fa20e471 Revert 115346. The change didn't break anything, the test was faulty. Will disable in a followup. - Revert r115276, it broke PanelDownloadTest.Download in interactive_ui_tests
on win,linux,mac.

Original change: Rename TabContents::controller() to GetController and put it into the WebContents namespace.

BUG=98716
TBR=dpranke
Review URL: http://codereview.chromium.org/8956050

TBR=jam

Review URL: http://codereview.chromium.org/9018016

TBR=thakis@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115428 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-21 22:35:56 +00:00
thakis@chromium.org
10b833ebf1 Revert r115276, it broke PanelDownloadTest.Download in interactive_ui_tests
on win,linux,mac.

Original change: Rename TabContents::controller() to GetController and put it into the WebContents namespace.

BUG=98716
TBR=dpranke
Review URL: http://codereview.chromium.org/8956050

TBR=jam

Review URL: http://codereview.chromium.org/9018016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115346 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-21 17:36:30 +00:00
jam@chromium.org
69cda6547d Rename TabContents::controller() to GetController and put it into the WebContents namespace.
BUG=98716
TBR=dpranke
Review URL: http://codereview.chromium.org/8956050

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115276 0039d316-1c4b-4281-b951-d872f2087c98
2011-12-21 05:09:04 +00:00
ananta@chromium.org
f3b1a084a0 Define the public interface for content browser RenderProcessHost. This interface is implemented by the RenderProcessHostImpl class which lives in content\browser\renderer_host\render_process_host_impl.cc/.h. The RenderProcessHostImpl class is a consolidation of the RenderProcessHost and BrowserRenderProcessHost classes.
The RenderProcessHost public interface was created from the now deleted RenderProcessHost class defined in content\browser\renderer_host\render_process_host.h. 
Additional methods have been added to the interface to ensure that it works correctly with the MockRenderProcessHost class used by unit tests. I had to implement a number of overrides in the MockRenderProcessHost  class to ensure that tests work correctly. This was because of assumptions in the tests that the MockRPH class was a real RPH which it was till now.

Added a TODO for the methods which could potentially be removed from this interface. Will revisit that in a subsequent CL.

BUG=98716
TEST=No change in functionality. Hopefully it all compiles and works.
Review URL: http://codereview.chromium.org/8515027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110615 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-18 00:34:30 +00:00
jam@chromium.org
b39ef1cbd6 Move resource_codes to content/public/common.
BUG=98716
Review URL: http://codereview.chromium.org/8382021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107061 0039d316-1c4b-4281-b951-d872f2087c98
2011-10-25 04:46:55 +00:00
phajdan.jr@chromium.org
af44e7fb02 Move in_process_browser_test and ui_test_utils to chrome/test/base
BUG=90905
Review URL: http://codereview.chromium.org/7532034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94720 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-29 18:32:32 +00:00
dpranke@chromium.org
1fcfb20665 Take two at splitting result codes between content and chrome.
content/common/result_codes.h contains only the codes defined in content. chrome/common/chrome_result_codes.h contains the codes defined in chrome and also includes (for convenience) the content header.

R=jam@chromium.org
BUG=76699
TEST=everything compiles

Review URL: http://codereview.chromium.org/7397004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93082 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-19 19:53:14 +00:00
dpranke@chromium.org
36d772caff Revert r92730, r92731, r92732 ... will land again once I ensure the win builds compile.
TBR=jam@chromium.org
BUG=none

TEST=

Review URL: http://codereview.chromium.org/7400002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92733 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-15 20:47:40 +00:00
dpranke@chromium.org
785c9672b5 This change will split the result codes between content and chrome.
This adds a new file into chrome/common and does a lot of renaming.

The current version is just a sketch of the headers, and nothing will
compile.

R=jam@chromium.org
BUG=76699
TEST=everything still compiles and runs

Review URL: http://codereview.chromium.org/7377010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92730 0039d316-1c4b-4281-b951-d872f2087c98
2011-07-15 20:07:08 +00:00
jam@chromium.org
4dd5793c22 Move the remaining files in chrome\common to content\common.
TBR=avi
Review URL: http://codereview.chromium.org/6672070

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78516 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-17 06:06:12 +00:00
jam@chromium.org
df8e899b92 Move core pieces of chrome\browser. I've only gone up to "g", will do the rest in another cl.
TBR=avi
Review URL: http://codereview.chromium.org/6538100

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75652 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-22 22:58:22 +00:00