How to hide minimize and maximize button from chromium browser?

2.048 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Mohan Pandit

ungelesen,
20.04.2017, 04:27:3020.04.17
an Chromium-dev
I am new to chromium. I have requirement to hide the minimize and maximize button from chromium browser.
So can you tell me what code in which file needs to be modified to achieve this requirement?

Asesh Shrestha

ungelesen,
20.04.2017, 10:00:4520.04.17
an Chromium-dev
What operating system are you using? I know how to do it on Windows not sure if Chromium has native and cross platform APIs for doing so

Asesh Shrestha

ungelesen,
20.04.2017, 10:11:0920.04.17
an Chromium-dev
Can you try returning false from these two methods from here: https://cs.chromium.org/chromium/src/ash/wm_window.cc?q=maximize+package:%5Echromium$&dr=CSs&l=517

Return false from CanMaximize and CanMinimize. Not sure if that's the method Chromium calls for enabling/disabling minimize and maximize buttons. 

The other way to do it is using Windows API: GetSystemMenu, EnableMenuItem etc. You will need the main window handle ie the handle of browser process to do so.


On Thursday, April 20, 2017 at 2:12:30 PM UTC+5:45, Mohan Pandit wrote:

djhaoyisi

ungelesen,
20.04.2017, 10:23:5420.04.17
an Chromium-dev
chromium api key

PhistucK

ungelesen,
20.04.2017, 13:06:1620.04.17
an djha...@gmail.com, Chromium-dev
Please, do not hijack threads with unrelated posts. See this page for API keys.


PhistucK

On Thu, Apr 20, 2017 at 5:23 PM, djhaoyisi <djha...@gmail.com> wrote:
chromium api key

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9c34e936-4bad-4191-84f0-2cfa45548c04%40chromium.org.

Simon Hong

ungelesen,
20.04.2017, 20:01:3520.04.17
an phis...@gmail.com, djha...@gmail.com, Chromium-dev

you can see that kinds of buttons in XXXBrowserFrameView.
In chromium, subclass of NonClientFrameView manages them.


2017년 4월 21일 (금) 오전 2:05, PhistucK <phis...@gmail.com>님이 작성:
Please, do not hijack threads with unrelated posts. See this page for API keys.


PhistucK

On Thu, Apr 20, 2017 at 5:23 PM, djhaoyisi <djha...@gmail.com> wrote:
chromium api key

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.

Mohan Pandit

ungelesen,
21.04.2017, 00:19:5221.04.17
an Chromium-dev
Yes I am using windows OS.

Mohan Pandit

ungelesen,
21.04.2017, 00:31:2821.04.17
an Chromium-dev
@Asesh can you mention the file name with relevant changes?

Asesh Shrestha

ungelesen,
21.04.2017, 09:47:5821.04.17
an Chromium-dev
You should follow Simon's answer instead. The one that I guessed might not be correct. Just click that link that I have posted, it will show you the name of that file and path too. But then again if it won't work then you should follow Simon's answer

Mohan Pandit

ungelesen,
24.04.2017, 23:49:2624.04.17
an Chromium-dev
Can it be possible to disable/hide the control button(minimize and maximize) externally without getting into code? 

Asesh Shrestha

ungelesen,
25.04.2017, 00:01:3825.04.17
an Chromium-dev
Well, if the Windows were created using dialog box templates then it could be done by modifying rc script but Chromium uses views and they are all done by code. So you will have to modify the code to do so. BTW did you try what we told you and what was the output?

Mohan Pandit

ungelesen,
25.04.2017, 00:08:5225.04.17
an Chromium-dev
I have updated above approach to developer team for investigating. But just to achieve above one, modifying code would be costly. That's why I am looking some external approach. Like using some command line argument, switch flag etc.
If there is any way please update me Thanks.

Asesh Shrestha

ungelesen,
25.04.2017, 00:28:1725.04.17
an Chromium-dev
You can find Chromium switches here in this file: src\chrome\common\chrome_switches.cc

Looks like it can't be done by using command line flags.

PhistucK

ungelesen,
25.04.2017, 02:08:0325.04.17
an Mohan Pandit, Chromium-dev
You should look into the Windows API, there may be ways to get an external window and change their controls, some interception of some kind. It will still require code, but external one which may be easier to maintain.
Obviously, out of scope for this discussion.


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/f8b2ca27-3420-42ed-9c4f-47c4ae4231fb%40chromium.org.

Asesh Shrestha

ungelesen,
25.04.2017, 02:41:2425.04.17
an Chromium-dev, mohanp...@gmail.com
SetWindowLongPtr is the API to do so. The most efficient way to do so is to modify the windows style of the browser process before it's created but you will have to dig through Chromium source code to do so.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten