0
Commit Graph

50 Commits

Author SHA1 Message Date
Yuwei Huang
73563374d5 [remoting corp logging] Implement CorpHostStatusLogger
This CL implements the CorpHostStatusLogger and hooks it up with the
JingleSessionManager, so that it reports the disconnect event to the
corp logging service with both the error code and the SessionAuthz
reauth token attached.

The tricky part of this CL is to pass the reauth token from the
SessionAuthzReauthorizer to the CorpHostStatusLogger. There is
`HostStatusObserver`, but it implements a mojo interface, meaning it
will be rather difficult to pass pointers around (without being rejected
by the mojo reviewer). Just passing the reauth token around in callbacks
would also work, but that would be very messy.

To get that working, this CL introduces a `SessionObserver`, which
allows implementations to observer state changes on multiple sessions
and know which session has changed. `authentication_type()` and
`implementing_authenticator()` are added to `Authenticator` to allow
`CorpHostStatusLogger` to extract the reauth token from the generalized
`Authenticator` reference.

Bug: b/328138087
Change-Id: Ic7b9ea297d28488ef65d4071860836b47e9c3b5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5359454
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1271835}
2024-03-12 21:39:57 +00:00
Sean Maher
5b9af51fdd task posting v3: moving away from ThreadTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5824001174667264

This will do a few sed-like modifications, changing calls to methods of
ThreadTaskRunnerHandle to calls to methods of
SingleThreadTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: Ia33b6dfebb15937481c619f5c838720ce7bb2676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031817
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1074085}
2022-11-21 15:32:47 +00:00
Avi Drissman
d6cdf9b877 Update copyright headers in rlz/, remoting/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: Ia865422057bdda8d25f347a651636f6f7f4d4278
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900694
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047637}
2022-09-15 19:52:53 +00:00
Joe Downing
39d710e414 Fixing nested namespace and thread checker macros in //remoting/protocol
Since working in this directory I've noticed that the presubmits will
'fail' if you modify a file with a nested namespace with the suggestion
that you should use the new style (namespace1::namespace2). I'd like to
be able to make quick modifications when needed without also dealing
with namespace formatting so I decided to fix this in a separate CL.

Along the same lines, I noticed that we aren't using the suggested
ThreadChecker macros consistently so I fixed that as well.

This CL also contains a small number of comment reflows and simple
modernization changes. I didn't do this exhaustively but there are a
handful which I noticed while fixing the other problems

No functional changes are expected as a result of these changes.

Change-Id: Ib99429b79fc9a3c55596602e279be8487866660c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3852429
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1039396}
2022-08-25 20:11:45 +00:00
Nan Lin
4fcf95d504 [Code Health] Replace base::DictionaryValue and base::ListValue in remoting
Bug: 1187061
Change-Id: Ia16e76fc3f72745852631385d7d62ef67a87d706
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3735351
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Commit-Queue: Nan Lin <linnan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1020240}
2022-07-01 21:05:46 +00:00
David Bertoni
02c447f13d [CodeHealth] Remove uses of ListValue::Append in /remoting/protocol.
This CL removes uses of the overload that accepts a
std::unique_ptr<base::Value>. It attempts to modernize code where
feasible and uses base::Value::FromUniquePtrValue where it's not.

This CL was uploaded by git cl split.

R=garykac@chromium.org

Bug: 1187097
Change-Id: I590a4e8ae1e098aaffcd338d10062255b47f0c19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3625341
Auto-Submit: David Bertoni <dbertoni@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999145}
2022-05-03 23:53:32 +00:00
Hans Wennborg
828a097503 Remove/replace unnecessary logging.h includes in .cc files (remoting)
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.

This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.

(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)

Bug: 1031540
Change-Id: Ifa4aa7eb8f4e1e39b56633f1c484c90e74d02a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164894
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762936}
2020-04-27 18:10:09 +00:00
Evan Stade
86dadf15ef Update all Closures in //remoting/protocol/ to Once or Repeating
This does not include non-Closure Callbacks.

Bug: 1007826
Change-Id: I3b170b504bfe125c08ebdcd4c4f9122018a49b40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103127
Commit-Queue: Joe Downing <joedow@chromium.org>
Auto-Submit: Evan Stade <estade@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750686}
2020-03-16 20:06:33 +00:00
Chris Watkins
6fe52aa20e Run clang-tidy modernize-use-equals-{delete,default} on //remoting
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8

This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md

In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up with:
  git diff --name-only | \
    xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'

BUG=778959,778957

Change-Id: I3805211c70d2c2340afa4d6d956339d1b25751fc
Reviewed-on: https://chromium-review.googlesource.com/789728
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Chris Watkins <watk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519543}
2017-11-28 03:24:05 +00:00
Brett Wilson
9c36199b07 Replace tracked_objects::Location with base::Location.
Part 4/4 to replace these namespace qualifications.

TBR=dcheng@chromium.org

Bug: 763556
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I31d6c69d73111165fb1bd8294cd0fe4e18ce96bd
Reviewed-on: https://chromium-review.googlesource.com/662561
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501199}
2017-09-12 06:05:21 +00:00
sergeyu
9fe3bc8107 Use SignalingAddress in SignalStrategy insterface.
Previously SignalStrategy::GetLocalJid() was returning non-normalized
JID. The value was passed as is to the authenticator in
JingleSessionManager::OnSignalStrategyIncomingStanza(). Client used
normalized JID value from SignalingAddress for authentication. As
result authentication was failing for hosts that use mixed-case
accounts. With this change GetLocalJid() is replaced with
GetLocalAddress(), which allows to ensure that JID is normalized on
both ends of connection.

BUG=707833

Review-Url: https://codereview.chromium.org/2798393007
Cr-Commit-Position: refs/heads/master@{#463737}
2017-04-11 19:57:12 +00:00
zijiehe
cf233ee721 [Chromoting] Add SessionPlugin in JingleSession
This change adds SessionPlugin interface, and an Session::AddPlugin() function
to attach SessionPlugin instances into Session and its derived classes.
In JingleSession, the plugins will be executed after receiving a message or
before sending a message.
So a SessionPlugin implementation can read fields from and write to a message.
Refer to change https://codereview.chromium.org/2586133002/, it shows how
HostExperimentSessionPlugin works as a SessionPlugin.

This is part of host experiment framework.

BUG=650926

Review-Url: https://codereview.chromium.org/2586403003
Cr-Commit-Position: refs/heads/master@{#441003}
2016-12-29 23:46:31 +00:00
joedow
7dc48990ea Adding a new authenticator which validates incoming connection details
This change introduces a new authenticator class which handles two scenarios:
- Connection policy validation (i.e. do the details of the connection match the
  current policies set on the machine)
- Interactive connection validation (i.e. prompt the user to allow the
  connection to be established)

The first scenario is typically synchronous but the second is async, therefore
this validation mechanism must handle both.  The new authenticator class wraps
another, functional authenticator to provide a level of validation before
allowing the wrapped authenticator to take over.

BUG=617185

Review-Url: https://codereview.chromium.org/2277553002
Cr-Commit-Position: refs/heads/master@{#415715}
2016-08-31 19:16:43 +00:00
dcheng
5d09049dde base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer.
BUG=581865
R=thakis@chromium.org
TBR=jochen@chromium.org,junov@chromium.org,rdevlin.cronin@chromium.org,rogerta@chromium.org,sky@chromium.org,xhwang@chromium.org,wez@chromium.org,zea@chromium.org

Review-Url: https://codereview.chromium.org/2051663003
Cr-Commit-Position: refs/heads/master@{#398941}
2016-06-09 17:59:42 +00:00
gab
bac02f5910 Fix include path for moved thread_task_runner_handle.h header in remoting/
Changes made by tools/git/move_source_file.py

BUG=610438
TBR=garykac

Review-Url: https://codereview.chromium.org/1969053002
Cr-Commit-Position: refs/heads/master@{#392982}
2016-05-11 17:57:30 +00:00
dcheng
0765c49ae6 Convert //remoting to use std::unique_ptr
BUG=554298
R=wez@chromium.org,rdevlin.cronin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#385571}
2016-04-06 22:43:13 +00:00
sergeyu
89d088b2b4 Include <utility> in files that use std::move() in remoting/protocol.
This is a follow up for crrev.com/366687 that converted
remoting/protocol to std::move()

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

Cr-Commit-Position: refs/heads/master@{#366780}
2015-12-24 00:23:33 +00:00
sergeyu
aa6fa234d0 Use std::move() instead of scoped_ptr<>::Pass() in remoting/protocol
Now there is a presubmit check that doesn't allow Pass() anymore.
See https://www.chromium.org/rvalue-references for information
about std::move in chromium.

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

Cr-Commit-Position: refs/heads/master@{#366687}
2015-12-22 23:27:37 +00:00
sergeyu
a609b7a407 Add VideoStream interface.
Added new VideoStream interface. VideoFramePump implements it. Later
there will be a separate implementation for WebRTC-based protocol.
ConnectionToClient is responsible for VideoStream creation.

BUG=547158

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

Cr-Commit-Position: refs/heads/master@{#362096}
2015-11-30 06:26:23 +00:00
sergeyu
60082fbfee Replace MockConnectionToClient with FakeConnectionToClient
MockConnectionToClient is hard to use and adds a lot of boilerplate in
tests. Replacing it with FakeConnectionToClient will make it easier
to make changes in the ConnectionToClient interface.

BUG=547158

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

Cr-Commit-Position: refs/heads/master@{#361442}
2015-11-24 21:13:44 +00:00
sergeyu
b031cd25ba Make protocol::ConnectionToClient an abstract interface.
Moved existing code to IceConnectionToClient. In future a new
WebrtcConnectionToClient will handle webrtc-based connection.

BUG=547158

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

Cr-Commit-Position: refs/heads/master@{#360673}
2015-11-19 22:18:34 +00:00
sergeyu
97568a816e Implement video frame acknowledgements in the chromoting protocol.
Added frame_id field in the  VideoPacket message. Client now acknowledges
every frame that has frame_id set by sending VideoAck messages after
the corresponding frame is decoded and rendered.

On the host the VideoAck messages are processed by the new
VideoFeedbackStub, which is implemented in CaptureScheduler.
CaptureScheduler limits number of unacknowledged frames to 4. This
number was chosen experimentally to minimize latency (using
remoting_perftests).

BUG=448838

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

Cr-Commit-Position: refs/heads/master@{#317824}
2015-02-24 18:01:33 +00:00
sergeyu
1f8cd500a5 Fix ConnectionToClient to connect stubs only after authentication.
Previously ConnectionToClient required stubs to be created before the
client is authenticated. This is no longer necessary. Fixed it so
set_*_stub() methods can be called only after authentication. Also
removed auth input filters from ClientSession as they are no longer
useful.

BUG=448838

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

Cr-Commit-Position: refs/heads/master@{#316299}
2015-02-13 21:47:41 +00:00
wez
1473701411 Break out Chromoting plugin's cursor & mouse-lock handling.
This CL breaks cursor & mouse-lock handling out of PepperInputHandler:
- PepperCursorSetter is added to set the native PPAPI cursor.
  Callers may provide an alternate stub to delegate to if the PPAPI cursor
  cannot be set; ChromotingInstance uses this for oversized cursor rendering.
- EmptyCursorFilter is added to normalize transparent cursors to (0x0).
- PepperMouseLocker is added, to handle mouse-lock mode.
  This hooks into the cursor pipeline in order to detect (non)empty cursor
  shapes and engage mouse-lock accordingly, and to control whether any cursor
  is rendered locally.
- ChromotingInstance is updated to handle rceived cursors via these helpers,
  so that it need only directly handle delegated oversized cursors itself.

BUG=138108, 429322

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

Cr-Commit-Position: refs/heads/master@{#305463}
2014-11-24 19:11:53 +00:00
alexeypa@chromium.org
3784660319 Refactored PairingRegistry::Delegate such that it can retrieve/modify for a single client.
The delegate implementation for Linux now keeps a separate JSON file per each pairing under "paired-clients" in the config directory.

This CL also makes the delegate completely synchronous moving jumping between task runners to the parent PairingRegistry.

BUG=156182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215187 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-02 01:35:16 +00:00
jamiewalch@chromium.org
3d03c33d13 Add serialization to PairingRegistry.
To implement this, PairingRegistry maintains a queue of pending requests. Each
public method wraps the original callback inside an interstitial callback that
runs the next pending request in addition to invoking the original callback.

BUG=156182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212553 0039d316-1c4b-4281-b951-d872f2087c98
2013-07-19 09:01:34 +00:00
jamiewalch@chromium.org
b1ae901f70 Linux pairing registry delegate implementation
BUG=156182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208123 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-23 14:10:30 +00:00
jamiewalch@chromium.org
df5189fff1 Changes to PairingRegistry to facilitate per-platform implementions.
Implementing the Linux pairing registry delegate required some changes to the cross-platform code. I've isolated them in this CL for clarity:

* Added a timestamp to the Pairing struct and made it a class with a Create method to generate the random information and timestamp.
* Added a callback to AddPairing. For now, this is only used in the unit test.

I also fixed a couple of unrelated linter errors in protocol_mock_objects.

BUG=156182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206947 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-18 12:12:05 +00:00
jamiewalch@chromium.org
40dade3275 Make the mapping from client id -> secret asynchronous.
In the original design, I intended the pairing registry delegate to maintain
an in-memory cache of client id -> secret, and for this to be invalidated by
a watcher when the on-disk version changes (for example, if the web-app is
used to revoke a pairing). I think an asynchronous model makes more sense,
and eliminates the need for the watcher.

In addition, this CL fixes a bug in the negotiating authenticator when dealing
with authenticators that process messages asychronously.

BUG=156182

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206347 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-14 07:08:11 +00:00
brettw@chromium.org
7ccb707107 Update includes of message_loop_proxy.
This keeps the forwarding header, just updates all current callers.

BUG=
R=avi@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205306 0039d316-1c4b-4281-b951-d872f2087c98
2013-06-10 20:56:28 +00:00
alexeypa@chromium.org
170cba4e5d [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

This is the 4th attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.
- |ClientSessionTest.ClampMouseEvents| makes sure that the expectations are destroyed when leaving TEST_F scope so that ASAN is not getting confused.

BUG=134694
TEST=remoting_unittests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156398 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-12 22:28:39 +00:00
peter@chromium.org
e7c9260935 Revert 156297 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

This is the 3rd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.

BUG=134694
TEST=remoting_unittests

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

TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10911248

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156298 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-12 15:11:15 +00:00
alexeypa@chromium.org
238c4c6a04 [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

This is the 3rd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ClientSession| objects are ref-counted to facilitate the asynchronous shutdown. They still have to be used and destroyed on the network thread.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.
- The unit tests were fixed to run message loops until all asynchronous object have been destroyed.

BUG=134694
TEST=remoting_unittests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156297 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-12 14:58:40 +00:00
alexeypa@chromium.org
59d3755062 Revert 155574 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

This is the 2nd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.

BUG=134694
TEST=remoting_unittests


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

TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10909143

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155616 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-09 04:05:34 +00:00
alexeypa@chromium.org
4c35f73337 [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

This is the 2nd attempt to land this change. This version includes:
- |ClientSession| objects are torn down asynchronously now.
- |ChromotingHost| now waits until all connections are torn down before deleting the session manager.

BUG=134694
TEST=remoting_unittests


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155574 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-08 09:52:34 +00:00
alexeypa@google.com
504a7f2dbd Revert 155219 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

BUG=134694
TEST=remoting_unittests

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

TBR=alexeypa@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10916161

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155276 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-06 23:30:58 +00:00
alexeypa@chromium.org
bc4eefa946 [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to ClientSession.
This CL changes the way screen/audio recorders and event executors are managed. New DesktopEnvironmentFactory class is now used by ChromotingHost's owner to specify the kind of desktop environment (or virtual terminal) to be used by the host. Screen/audio recorders and event executors now owned by the ClientSession instance, so there is a separate set of recorders and stubs exists for each authenticated client session. Clients sessions can now be torn dowsn in parallel with the host shuttting down.

BUG=134694
TEST=remoting_unittests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155219 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-06 18:30:17 +00:00
wez@chromium.org
c7bb03da43 Remove the HostEventStub aggregate interface.
BUG=118511


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151100 0039d316-1c4b-4281-b951-d872f2087c98
2012-08-10 18:49:49 +00:00
simonmorris@chromium.org
42c83708c8 [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded.
This will help improve ChromotingHost's unit tests.

BUG=86546


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142473 0039d316-1c4b-4281-b951-d872f2087c98
2012-06-15 20:45:44 +00:00
sergeyu@chromium.org
be451c8bdb Log connection type to syslogs and to the server.
Also updated HostStatusObserver to receive transport route information as
part of the OnClientRouteChange() notification, so that logging code
receives connection type in order to log it.

BUG=96736

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127814 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-20 22:24:47 +00:00
simonmorris@chromium.org
e265ad798d Add the plumbing that will carry a clipboard item from a chromoting client to a host.
BUG=117473


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127195 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-16 17:28:03 +00:00
lambroslambrou@google.com
91e4b7f653 More plumbing for logging connection IP addresses
Followup CL to http://codereview.chromium.org/9271026/ - this passes the
RouteChange() notification from ConnectionToClient through the various layers
to the ChromotingHost.

BUG=109682
TEST=Compiles, unit-tests pass.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119137 0039d316-1c4b-4281-b951-d872f2087c98
2012-01-25 23:23:02 +00:00
sergeyu@chromium.org
ec64118730 Make ConnectionToClient and ClientSession not ref-counted.
Also made then NonThreadSafe.

BUG=96325
TEST=Chromoting works.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109574 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-11 03:28:55 +00:00
sergeyu@chromium.org
ee910fdf74 Move ConnectionToClient::EventHandler from ChromotingHost to ClientSession
BUG=None
TEST=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109457 0039d316-1c4b-4281-b951-d872f2087c98
2011-11-10 18:23:31 +00:00
nduca@chromium.org
edd685f15d Add MessageLoopProxy::current
Review URL: http://codereview.chromium.org/7583053

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-15 20:33:46 +00:00
sergeyu@chromium.org
60fc9600a6 Use MessageLoopProxy for network message loop.
When we switch to P2P Pepper API we will need to run networking code on the
main plugin thread. Switching to MessageLoopProxy for network thread, so that
it's easier to switch network thread in the future.

BUG=None
TEST=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96651 0039d316-1c4b-4281-b951-d872f2087c98
2011-08-12 23:07:05 +00:00
simonmorris@chromium.org
4ea2c7cfa0 The authenticated_ fields are moved out of stubs and into
ClientSession. Messages to the stubs are dispatched via
ClientSession, and the stub classes are pure virtual.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79991 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-31 14:20:06 +00:00
simonmorris@chromium.org
44f6076044 ChromotingHost can have multiple connections, but only one
authenticated connection. When a connection is
authenticated, the host disconnects all other connections.

The result is that if a client has disconnected without the
host noticing, another client can connect immediately,
without having to wait for the older connection to time out.

The new ClientSession class encapsulates a
ConnectionToClient and per-client state. It has taken the
HostStub implementation away from DesktopEnvironment.

BUG=70013
TEST=extra unit test; also see repro steps in BUG

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79114 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-23 12:13:35 +00:00
garykac@chromium.org
f0a9d1b2f3 Block event processing on host/client until the client has authenticated.
Input events:
* Client will not send them
* Host will not process them

Control events:
* Client will only process BeginSessionResponse
* Host will only process BeginSessionRequest
All other control messages will be ignored.

BUG=72466
TEST=manual+tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76974 0039d316-1c4b-4281-b951-d872f2087c98
2011-03-04 21:31:44 +00:00
erg@google.com
0a071a315d More out-of-lining of test code, along with a bunch of GMOCK objects.
Most notably, rename various mock_objects.h files in remoting/ because after deinlining, there were compile failures. This fixes Windows compiling because you can't have two implementation files with the same name in a project, even if they are in different directories. (The output from one compile will clobber the others!)

BUG=none
TEST=compiles

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74059 0039d316-1c4b-4281-b951-d872f2087c98
2011-02-08 00:18:24 +00:00