how to make chromium transparent

2,345 views
Skip to first unread message

Jianhua Shao

unread,
Oct 16, 2012, 8:11:08 AM10/16/12
to chromi...@chromium.org
Here, 'transparent' means user could see the other application's window below chromium's window.
I mean something like 'webkit_web_view_set_transparent' in gtk-webkit, if you know it.

I am new to development of chromium. I have another question is, how I could write a simple html player which
only contains a webview (in words of gtk), based on chromium's webkit engine?

Jianhua Shao

unread,
Oct 17, 2012, 10:29:01 PM10/17/12
to chromi...@chromium.org
Well, seems no one knows how to do it...
After I looked into some source codes of chromium, I found there is a method "SetIsTransparent" in webview class.
Is it used to set the chromium window to be transparent?

Jeremy Apthorp

unread,
Oct 17, 2012, 10:36:49 PM10/17/12
to alex...@gmail.com, Chromium-dev
Perhaps look at http://codereview.chromium.org/10986092/ (which is Ash-only at the moment, but might be relevant to your interests)


--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

James Robinson

unread,
Oct 17, 2012, 10:37:33 PM10/17/12
to alex...@gmail.com, chromi...@chromium.org
On Wed, Oct 17, 2012 at 7:29 PM, Jianhua Shao <alex...@gmail.com> wrote:
Well, seems no one knows how to do it...
After I looked into some source codes of chromium, I found there is a method "SetIsTransparent" in webview class.
Is it used to set the chromium window to be transparent?

That's the idea  but it's not fully implemented.  The bug tracking this feature is http://code.google.com/p/chromium/issues/detail?id=125295


On Tuesday, October 16, 2012 8:11:08 PM UTC+8, Jianhua Shao wrote:
Here, 'transparent' means user could see the other application's window below chromium's window.
I mean something like 'webkit_web_view_set_transparent' in gtk-webkit, if you know it.

I am new to development of chromium. I have another question is, how I could write a simple html player which
only contains a webview (in words of gtk), based on chromium's webkit engine?

--

Jianhua Shao

unread,
Oct 18, 2012, 9:43:21 PM10/18/12
to chromi...@chromium.org, alex...@gmail.com
I got a 403 error when accessing the following link...
What does it mean by "not fully implemented"? I just want it to work on linux. And because of system library dependency problem, I am working on version chromium 11 now.
Has this feature been implemented on chromium 11 on linux?

Jianhua Shao

unread,
Oct 18, 2012, 10:05:13 PM10/18/12
to chromi...@chromium.org, alex...@gmail.com
Thanks for your information.
I read the codes in the link. Seems to make the chromium window transparent, what I need to do is to override the
 method 'RenderViewCreated' from 'content::WebContentsObserver'. I will have a try.

And I have two question about it.
* What do you mean by 'ash only'? I am new to chromium development, I have to read more document about it..
* What I want to achieve is to make the window always transparent. That means, I don't want the default white background. By default (without setting the background in html),
   I want the window to be transparent in the area which is now in black color. While the background is set in html, then use the background that user set.
  Is the following implementation same as my description?

Jianhua Shao

unread,
Oct 19, 2012, 1:28:57 AM10/19/12
to chromi...@chromium.org, alex...@gmail.com


On Thursday, October 18, 2012 10:37:39 AM UTC+8, James Robinson wrote:


On Wed, Oct 17, 2012 at 7:29 PM, Jianhua Shao <alex...@gmail.com> wrote:
Well, seems no one knows how to do it...
After I looked into some source codes of chromium, I found there is a method "SetIsTransparent" in webview class.
Is it used to set the chromium window to be transparent?

That's the idea  but it's not fully implemented.  The bug tracking this feature is http://code.google.com/p/chromium/issues/detail?id=125295

  I modified WebViewImpl::WebViewImpl(...) to set m_isTransparent to be true, it give me a black-look  background. Seems I need to set a transparent background myself somewhere?

Fred Akalin

unread,
Oct 19, 2012, 1:38:33 AM10/19/12
to alex...@gmail.com, chromi...@chromium.org
It's unlikely that anything we suggest will apply to an old version
such as chromium 11.

Jianhua Shao

unread,
Oct 19, 2012, 2:32:59 AM10/19/12
to chromi...@chromium.org, alex...@gmail.com


On Friday, October 19, 2012 1:38:41 PM UTC+8, Fred Akalin wrote:
It's unlikely that anything we suggest will apply to an old version
such as chromium 11.

 OK. I will try to use newer version...
 
Reply all
Reply to author
Forward
0 new messages