How chromium-windows port shows the UI widgets

50 views
Skip to first unread message

Mustafizur Rahaman

unread,
Oct 12, 2011, 11:30:49 AM10/12/11
to Chromium-discuss
Hi All,

I am doing some investigation on the chromium-windows port & I am looking into how the browser creates/display several native widgets e.g. URL bar etc. I did some investigation over the past couple of days but yet to get a clue of how chromium interacts with the Windows api for the native widgets.

Any doc/source code reference as to where inside chromium code I should look for would be greatly appreciated.

Thanks,
Rahaman

PhistucK

unread,
Oct 12, 2011, 11:34:57 AM10/12/11
to musta...@gmail.com, Chromium-discuss
General development documentation for the Chromium projects -

For the Chromium browser -

For the UI framework -

For native controls -

Enjoy. :)


PhistucK



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

Mustafizur Rahaman

unread,
Oct 13, 2011, 10:15:00 AM10/13/11
to PhistucK, Chromium-discuss
Hi,

Thanks a lot for the guidance, it helped me a lot:)

So, I was trying to remove certain features like FEATURE_TOOLBAR & FEATURE_LOCATIONBAR , and it looked fine. But when I am trying to remove FEATURE_TABSTRIP, attached is the screenshot I am getting. My code changes are as follows
 
diff --git a/src/chrome/browser/ui/browser.cc b/src/chrome/browser/ui/browser.cc
index bd6218a..b061a62 100644
--- a/src/chrome/browser/ui/browser.cc
+++ b/src/chrome/browser/ui/browser.cc
@@ -1262,8 +1262,8 @@ bool Browser::SupportsWindowFeatureImpl(WindowFeature feat
     if (type() != TYPE_NORMAL)
       features |= FEATURE_TITLEBAR;

-    if (type() == TYPE_NORMAL)
-      features |= FEATURE_TABSTRIP;
+    //if (type() == TYPE_NORMAL)
+    //  features |= FEATURE_TABSTRIP;

I just want to get chrome inside a top level window having minimize,maximize,close button at the top right.

So, my questions is am i doing everything right or there are some other changes too I need to do?

Thanks,
Rahaman
Chrome_Wo_tabStrip.png

Torne (Richard Coles)

unread,
Oct 13, 2011, 10:20:16 AM10/13/11
to musta...@gmail.com, PhistucK, Chromium-discuss
You need to add FEATURE_TITLEBAR instead to get a normal titlebar.
--
Torne (Richard Coles)
to...@google.com

Mustafizur Rahaman

unread,
Oct 13, 2011, 2:20:02 PM10/13/11
to Torne (Richard Coles), PhistucK, Chromium-discuss
Thanks Richard, I tried with the following change also, but still facing the same problem, has any one faced similar problem. I am somehow not able to show my title bar :(

-  unsigned int features = FEATURE_INFOBAR | FEATURE_SIDEBAR;
+  unsigned int features = FEATURE_INFOBAR | FEATURE_SIDEBAR | FEATURE_TITLEBAR;

 #if !defined(OS_CHROMEOS)
   // Chrome OS opens a FileBrowse pop up instead of using download shelf.
@@ -1259,11 +1259,11 @@ bool Browser::SupportsWindowFeatureImpl(WindowFeature fe

   if (!hide_ui_for_fullscreen) {
-    if (type() != TYPE_NORMAL)
+    if (type() == TYPE_NORMAL)

       features |= FEATURE_TITLEBAR;

-    if (type() == TYPE_NORMAL)
-      features |= FEATURE_TABSTRIP;
+    //if (type() == TYPE_NORMAL)
+    //  features |= FEATURE_TABSTRIP;

Thanks,
Rahaman

Mustafizur Rahaman

unread,
Oct 14, 2011, 6:27:23 AM10/14/11
to Torne (Richard Coles), PhistucK, Chromium-discuss
Finally I am able to show the title bar without the tab strip. Upon investigation inside the chromium code, I found that the title bar support was only available for OpaqueBrowserFrameView and NOT for GlassBrowserFrameView.

So, when I select "Windows7 theme", it invokes GlassBrowserFrameView & title bar was not working, but with "Windows7 basic theme", it invokes OpaqueBrowserFrameView  & title bar is working.

Therefore my question, (I am working on Chromium12)
#1>Why the title bar support is  not available for GlassBrowserFrameView? Is it a bug?
#2>And if not, then what is the expected behavior for Windows 7 theme(GlassBrowserFrameView) for the above mentioned use case?

Thanks.
Rahaman
Reply all
Reply to author
Forward
0 new messages