[chromium-dev] Re: Adding a Custom Scheme

2009-07-30 Thread Kruncher

I would assume that I need to create a HTTP request from within the
"my-scheme" job, and then have "my-scheme" copy the response back
thereby masking the request.

I will give this a try. If anyone knows of a simpler approach, their
advice would be greatly appreciated.

On 30 July, 20:02, Kruncher  wrote:
> I have just tried adding the scheme directly beneath where the
> standard Chromium ones are being registered. The scheme is now being
> recognized within the web browser.
>
> When "my-scheme://test" is entered, the location bar now automatically
> switches to "http://192.168.1.4:8080/";.
>
> Is it possible to make the Chromium location bar show "my-scheme://
> test" but still have the page come from "http://192.168.1.4:8080/";?
>
> On 30 July, 09:39, Kruncher  wrote:
>
>
>
> > I tried selecting an alternative from the autocomplete suggestions,
> > but all of them resort to a Google search.
>
> > From what I saw last night, it seems as though any factory methods
> > that are registered prior to the "BrowserMain" method are being
> > cleared, and then the Chromium methods are being registered. I haven't
> > been able to spend very much time exploring/breaking throughout the
> > Chromium source yet. I am going to give it another try when I get home
> > from work tonight.
>
> > Thanks,
>
> > On 30 July, 08:44, Peter Kasting  wrote:
>
> > > On Thu, Jul 30, 2009 at 12:38 AM, Tim Steele  wrote:
>
> > > > We only had one URL for the scheme in question, so whether it was for 
> > > > the
> > > > entire scheme didn't matter.
>
> > > Ah.  Yeah, that'd do it.
>
> > > PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Adding a Custom Scheme

2009-07-30 Thread Kruncher

I have just tried adding the scheme directly beneath where the
standard Chromium ones are being registered. The scheme is now being
recognized within the web browser.

When "my-scheme://test" is entered, the location bar now automatically
switches to "http://192.168.1.4:8080/";.

Is it possible to make the Chromium location bar show "my-scheme://
test" but still have the page come from "http://192.168.1.4:8080/";?

On 30 July, 09:39, Kruncher  wrote:
> I tried selecting an alternative from the autocomplete suggestions,
> but all of them resort to a Google search.
>
> From what I saw last night, it seems as though any factory methods
> that are registered prior to the "BrowserMain" method are being
> cleared, and then the Chromium methods are being registered. I haven't
> been able to spend very much time exploring/breaking throughout the
> Chromium source yet. I am going to give it another try when I get home
> from work tonight.
>
> Thanks,
>
> On 30 July, 08:44, Peter Kasting  wrote:
>
>
>
> > On Thu, Jul 30, 2009 at 12:38 AM, Tim Steele  wrote:
>
> > > We only had one URL for the scheme in question, so whether it was for the
> > > entire scheme didn't matter.
>
> > Ah.  Yeah, that'd do it.
>
> > PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Adding a Custom Scheme

2009-07-30 Thread Kruncher

I tried selecting an alternative from the autocomplete suggestions,
but all of them resort to a Google search.

>From what I saw last night, it seems as though any factory methods
that are registered prior to the "BrowserMain" method are being
cleared, and then the Chromium methods are being registered. I haven't
been able to spend very much time exploring/breaking throughout the
Chromium source yet. I am going to give it another try when I get home
from work tonight.

Thanks,

On 30 July, 08:44, Peter Kasting  wrote:
> On Thu, Jul 30, 2009 at 12:38 AM, Tim Steele  wrote:
>
> > We only had one URL for the scheme in question, so whether it was for the
> > entire scheme didn't matter.
>
> Ah.  Yeah, that'd do it.
>
> PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Adding a Custom Scheme

2009-07-29 Thread Kruncher

When the debugger breaks inside the "SupportsScheme" function, the
factories list does not include "my-scheme".

Perhaps I am trying to register the scheme too early? Do I need to add
this directly below where the various "chrome" schemes are registered,
or is it possible to keep it in the domain of a custom application?

On 30 July, 00:40, Peter Kasting  wrote:
> On Wed, Jul 29, 2009 at 4:23 PM, Kruncher  wrote:
> > Those are the kinds of URL's that I have been trying, but when I hit
> > enter it reverts to:
>
> >http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=my-scheme:/...
>
> Put my-scheme://some-url in the address bar and set a breakpoint in
> URLRequestJobManager::SupportsScheme().  Now type a letter at the end.  You
> should hit your breakpoint.  Check and see if |factories_| contains your
> scheme.  If not, you need to make that happen.  If it does, and this
> function therefore returns true, there's some problem at the time you
> actually open the URL.
>
> PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Adding a Custom Scheme

2009-07-29 Thread Kruncher

Those are the kinds of URL's that I have been trying, but when I hit
enter it reverts to:

http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=my-scheme://some-url

It seems almost as though the scheme factory is not getting
registered.

I am working on a help viewer. When the viewer is opened a local web
server is initialized on port 8080 (for the time being). I basically
want to rewrite all URLs that begin with "my-scheme://" with "http://
192.168.1.4:8080/" the local machines IP address and port.


On 30 July, 00:10, Eric Roman  wrote:
> The entry point would be to enter a URL that uses the custom scheme.
>
> i.e. you would need to type in "my-scheme://some-url" to reach the
> custom scheme handler.
>
> Not sure what you are trying to build.
>
>
>
> On Wed, Jul 29, 2009 at 3:39 PM, Kruncher wrote:
>
> > Hi Eric,
>
> > I have just tried the code that you have suggested, however, if I
> > enter a URL in the Chromium location bar and hit enter, Chromium is
> > still defaulting to a Google search.
>
> > I have tried placing a breakpoint within the constructor and each of
> > the virtual methods, and the factory method. When running in debug
> > mode, none of these breakpoints are being hit. I tried adding a
> > breakpoint directly after the factory is being registered, and the
> > program is breaking at this point.
>
> > Thanks for your help!
>
> > On 29 July, 22:32, Eric Roman  wrote:
> >> You are pretty close.
>
> >> What you want to do is override URLRequestJob::IsRedirectResponse(),
> >> rather than trying to do the redirect in the factory.
>
> >> Something like this should work:
>
> >> class URLRequestCustomJob : public URLRequestJob {
> >>  public:
> >>   explicit URLRequestCustomJob(URLRequest* request) : 
> >> URLRequestJob(request) {}
>
> >>   // URLRequestJob methods:
> >>   virtual void Start() {
> >>     NotifyHeadersComplete();
> >>   }
>
> >>   virtual bool IsRedirectResponse(GURL* location, int* http_status_code) {
> >>     *http_status_code = 301;
> >>     *location = GURL("http://i-redirected-you/cuz-im-the-awesome";);
> >>     return true;
> >>   }
>
> >>   static URLRequestJob* Factory(URLRequest* request, const
> >> std::string& scheme) {
> >>     return new URLRequestCustomJob(request);
> >>   }
>
> >> };
> >> On Mon, Jul 27, 2009 at 5:44 PM, Kruncher wrote:
>
> >> > Hi,
>
> >> > I am trying to add a custom scheme to the Chromium browser. I am
> >> > trying to write a scheme that will transparently redirect requests to
> >> > another URL.
>
> >> > For some reason, however, my custom scheme does not appear to get
> >> > recognized. Could somebody tell me what I am doing wrong?
>
> >> > For the time being I have added the following code to the
> >> > "chrome_exe_main.cc" source.
>
> >> > //
> >> > // Added above the main Windows function.
> >> > //
>
> >> > #include "net/url_request/url_request.h"
> >> > #include "net/url_request/url_request_http_job.h"
>
> >> > static const char kCustomURLScheme[] = "my-scheme";
>
> >> > class URLRequestCustomJob : public URLRequestJob {
> >> >  public:
> >> >  static URLRequestJob* Factory(URLRequest* request, const
> >> > std::string& scheme) {
> >> >          DCHECK(scheme == "my-scheme");
>
> >> >          // Redirect response to a local network resource.
> >> >          std::string& requestPath = 
> >> > request->url().PathForRequest().replace
> >> > (0, 10, "http://192.168.1.4:8080";);
>
> >> >          // I tried using the following line, but it turns out that the
> >> > "Redirect" function is protected.
> >> >          //request->Redirect(GURL(requestPath), 
> >> > request->status().status());
> >> >          // So instead I am attempting to create a new request.
> >> >          request = new URLRequest(GURL(requestPath), 
> >> > request->delegate());
>
> >> >          // Proceed with regular HTTP scheme factory.
> >> >          return URLRequestHttpJob::Factory(request, "http");
> >> >        }
> >> > };
>
> >> > //
> >> > // Added above "#if defined(GOOGLE_CHROME_BUILD)" inside Windows main
> >> > function.
> >> > //
>
> >> > // Register custom scheme:
> >> > url_util::AddStandardScheme(kCustomURLScheme);
> >> > URLRequest::RegisterProtocolFactory(kCustomURLScheme,
> >> > &URLRequestCustomJob::Factory);
>
> >> > Many thanks,
> >> > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Adding a Custom Scheme

2009-07-29 Thread Kruncher

Hi Eric,

I have just tried the code that you have suggested, however, if I
enter a URL in the Chromium location bar and hit enter, Chromium is
still defaulting to a Google search.

I have tried placing a breakpoint within the constructor and each of
the virtual methods, and the factory method. When running in debug
mode, none of these breakpoints are being hit. I tried adding a
breakpoint directly after the factory is being registered, and the
program is breaking at this point.

Thanks for your help!

On 29 July, 22:32, Eric Roman  wrote:
> You are pretty close.
>
> What you want to do is override URLRequestJob::IsRedirectResponse(),
> rather than trying to do the redirect in the factory.
>
> Something like this should work:
>
> class URLRequestCustomJob : public URLRequestJob {
>  public:
>   explicit URLRequestCustomJob(URLRequest* request) : URLRequestJob(request) 
> {}
>
>   // URLRequestJob methods:
>   virtual void Start() {
>     NotifyHeadersComplete();
>   }
>
>   virtual bool IsRedirectResponse(GURL* location, int* http_status_code) {
>     *http_status_code = 301;
>     *location = GURL("http://i-redirected-you/cuz-im-the-awesome";);
>     return true;
>   }
>
>   static URLRequestJob* Factory(URLRequest* request, const
> std::string& scheme) {
>     return new URLRequestCustomJob(request);
>   }
>
>
>
> };
> On Mon, Jul 27, 2009 at 5:44 PM, Kruncher wrote:
>
> > Hi,
>
> > I am trying to add a custom scheme to the Chromium browser. I am
> > trying to write a scheme that will transparently redirect requests to
> > another URL.
>
> > For some reason, however, my custom scheme does not appear to get
> > recognized. Could somebody tell me what I am doing wrong?
>
> > For the time being I have added the following code to the
> > "chrome_exe_main.cc" source.
>
> > //
> > // Added above the main Windows function.
> > //
>
> > #include "net/url_request/url_request.h"
> > #include "net/url_request/url_request_http_job.h"
>
> > static const char kCustomURLScheme[] = "my-scheme";
>
> > class URLRequestCustomJob : public URLRequestJob {
> >  public:
> >  static URLRequestJob* Factory(URLRequest* request, const
> > std::string& scheme) {
> >          DCHECK(scheme == "my-scheme");
>
> >          // Redirect response to a local network resource.
> >          std::string& requestPath = request->url().PathForRequest().replace
> > (0, 10, "http://192.168.1.4:8080";);
>
> >          // I tried using the following line, but it turns out that the
> > "Redirect" function is protected.
> >          //request->Redirect(GURL(requestPath), request->status().status());
> >          // So instead I am attempting to create a new request.
> >          request = new URLRequest(GURL(requestPath), request->delegate());
>
> >          // Proceed with regular HTTP scheme factory.
> >          return URLRequestHttpJob::Factory(request, "http");
> >        }
> > };
>
> > //
> > // Added above "#if defined(GOOGLE_CHROME_BUILD)" inside Windows main
> > function.
> > //
>
> > // Register custom scheme:
> > url_util::AddStandardScheme(kCustomURLScheme);
> > URLRequest::RegisterProtocolFactory(kCustomURLScheme,
> > &URLRequestCustomJob::Factory);
>
> > Many thanks,
> > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Adding a Custom Scheme

2009-07-27 Thread Kruncher

Hi,

I am trying to add a custom scheme to the Chromium browser. I am
trying to write a scheme that will transparently redirect requests to
another URL.

For some reason, however, my custom scheme does not appear to get
recognized. Could somebody tell me what I am doing wrong?

For the time being I have added the following code to the
"chrome_exe_main.cc" source.

//
// Added above the main Windows function.
//

#include "net/url_request/url_request.h"
#include "net/url_request/url_request_http_job.h"

static const char kCustomURLScheme[] = "my-scheme";


class URLRequestCustomJob : public URLRequestJob {
 public:
  static URLRequestJob* Factory(URLRequest* request, const
std::string& scheme) {
  DCHECK(scheme == "my-scheme");

  // Redirect response to a local network resource.
  std::string& requestPath = request->url().PathForRequest().replace
(0, 10, "http://192.168.1.4:8080";);

  // I tried using the following line, but it turns out that the
"Redirect" function is protected.
  //request->Redirect(GURL(requestPath), request->status().status());
  // So instead I am attempting to create a new request.
  request = new URLRequest(GURL(requestPath), request->delegate());

  // Proceed with regular HTTP scheme factory.
  return URLRequestHttpJob::Factory(request, "http");
}
};


//
// Added above "#if defined(GOOGLE_CHROME_BUILD)" inside Windows main
function.
//

// Register custom scheme:
url_util::AddStandardScheme(kCustomURLScheme);
URLRequest::RegisterProtocolFactory(kCustomURLScheme,
&URLRequestCustomJob::Factory);

Many thanks,
Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Getting Started with a New Project

2009-07-26 Thread Kruncher

Excellent, I am almost there now.

I have looked through several of the Chromium projects, but I cannot
see how they are specifying additional libs. Which libs are needed to
make this link?

Thanks again for your help!

On 26 July, 21:52, "Juan Baez"  wrote:
> You are not missing any header files.  Windows has its own definition of min
> and max, and so does the STL library.  So to avoid conflict between the two,
> define the preprocessor directive NOMINMAX in your project.    
>
>
>
> -Original Message-
> From: chromium-dev@googlegroups.com [mailto:chromium-...@googlegroups.com]
>
> On Behalf Of Kruncher
> Sent: Sunday, July 26, 2009 2:48 PM
> To: Chromium-dev
> Subject: [chromium-dev] Re: Getting Started with a New Project
>
> What you have suggested seems to have solved the header file issue,
> unfortunately I am now getting the following errors:
>
> 1>c:\chromium\src\views\view.h(161) : error C2589: '(' : illegal token
> on right side of '::'
> 1>c:\chromium\src\views\view.h(161) : error C2059: syntax error : '::'
> 1>c:\chromium\src\views\view.h(161) : error C2589: '(' : illegal token
> on right side of '::'
>
> There must be another header or definition that I am missing.
>
> Here is a snapshot of the code where the errors are being encountered:
>
>   void SetBounds(int x, int y, int width, int height) {
>     SetBounds(gfx::Rect(x, y, std::max(0, width), std::max(0,
> height)));        // IT IS THIS LINE ***
>   }
>
> Chromium seems to be undergoing some pretty major changes at the
> moment.
>
> Many thanks,
> Lea Hayes
>
> On 26 July, 04:48, Juan Baez  wrote:
> > After some research and SVN history browsing I found out that
> > ChromiumCanvas is no more. Instead, use the gfx::Canvas class.  Your
> > header files should look somewhat like this (for the example to
> > compile):
>
> > #include "app/gfx/canvas.h"
> > #include "views/view.h"
> > #include "views/controls/label.h"
> > #include "views/window/window.h"
> > #include "views/window/window_delegate.h"
>
> > Hope that helps a little.
>
> > On Jul 25, 8:34 pm, Juan Baez  wrote:
>
> > > Where you able to figure this out Kruncher? If so, could you provide
> > > me with some feedback as to how you resolved the problem? I am sort of
> > > trying to do something similar myself.
>
> > > On Jul 20, 2:41 am, Kruncher  wrote:
>
> > > > Yes, I tried adding thatprojectbut it didn't seem to help.
>
> > > > On 19 July, 20:49, Thiago Farina  wrote:
>
> > > > > Did you added the commonprojectto your solution?
>
> > > > > On Jul 19, 12:40 pm, Kruncher  wrote:
>
> > > > > > For the purposes of practice I am trying to create an empty Win32
> Exe
> > > > > >projectthat uses the demonstration code from:
>
> > > > > >http://dev.chromium.org/developers/design-documents/chromeviews
>
> > > > > > To do this I have created a new solution and an emptyproject. I
> have
> > > > > > then added the demonstration code, and in theprojectsettings added
> > > > > > the additional include/lib directories (which I copied from an Exe
> > > > > >projectfrom the Chromium trunk).
>
> > > > > > However, when I try to build theproject, I get the following
> > > > > > compilation error:
>
> > > > > > 1>c:\chromium\src\quick_test\quick_test\views\main_window.cc(4) :
> > > > > > fatal error C1083: Cannot open include file: 'chrome/common/gfx/
> > > > > > chrome_canvas.h': No such file or directory
>
> > > > > > What steps are required to create a new solution/projectof this
> > > > > > nature? I would really like to use the views API that Chromium has
> to
> > > > > > offer.
>
> > > > > > Many thanks,
> > > > > > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Getting Started with a New Project

2009-07-26 Thread Kruncher

What you have suggested seems to have solved the header file issue,
unfortunately I am now getting the following errors:

1>c:\chromium\src\views\view.h(161) : error C2589: '(' : illegal token
on right side of '::'
1>c:\chromium\src\views\view.h(161) : error C2059: syntax error : '::'
1>c:\chromium\src\views\view.h(161) : error C2589: '(' : illegal token
on right side of '::'

There must be another header or definition that I am missing.

Here is a snapshot of the code where the errors are being encountered:

  void SetBounds(int x, int y, int width, int height) {
SetBounds(gfx::Rect(x, y, std::max(0, width), std::max(0,
height)));// IT IS THIS LINE ***
  }

Chromium seems to be undergoing some pretty major changes at the
moment.

Many thanks,
Lea Hayes


On 26 July, 04:48, Juan Baez  wrote:
> After some research and SVN history browsing I found out that
> ChromiumCanvas is no more. Instead, use the gfx::Canvas class.  Your
> header files should look somewhat like this (for the example to
> compile):
>
> #include "app/gfx/canvas.h"
> #include "views/view.h"
> #include "views/controls/label.h"
> #include "views/window/window.h"
> #include "views/window/window_delegate.h"
>
> Hope that helps a little.
>
> On Jul 25, 8:34 pm, Juan Baez  wrote:
>
>
>
> > Where you able to figure this out Kruncher? If so, could you provide
> > me with some feedback as to how you resolved the problem? I am sort of
> > trying to do something similar myself.
>
> > On Jul 20, 2:41 am, Kruncher  wrote:
>
> > > Yes, I tried adding thatprojectbut it didn't seem to help.
>
> > > On 19 July, 20:49, Thiago Farina  wrote:
>
> > > > Did you added the commonprojectto your solution?
>
> > > > On Jul 19, 12:40 pm, Kruncher  wrote:
>
> > > > > For the purposes of practice I am trying to create an empty Win32 Exe
> > > > >projectthat uses the demonstration code from:
>
> > > > >http://dev.chromium.org/developers/design-documents/chromeviews
>
> > > > > To do this I have created a new solution and an emptyproject. I have
> > > > > then added the demonstration code, and in theprojectsettings added
> > > > > the additional include/lib directories (which I copied from an Exe
> > > > >projectfrom the Chromium trunk).
>
> > > > > However, when I try to build theproject, I get the following
> > > > > compilation error:
>
> > > > > 1>c:\chromium\src\quick_test\quick_test\views\main_window.cc(4) :
> > > > > fatal error C1083: Cannot open include file: 'chrome/common/gfx/
> > > > > chrome_canvas.h': No such file or directory
>
> > > > > What steps are required to create a new solution/projectof this
> > > > > nature? I would really like to use the views API that Chromium has to
> > > > > offer.
>
> > > > > Many thanks,
> > > > > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Getting Started with a New Project

2009-07-20 Thread Kruncher

Yes, I tried adding that project but it didn't seem to help.


On 19 July, 20:49, Thiago Farina  wrote:
> Did you added the common project to your solution?
>
> On Jul 19, 12:40 pm, Kruncher  wrote:
>
>
>
> > For the purposes of practice I am trying to create an empty Win32 Exe
> > project that uses the demonstration code from:
>
> >http://dev.chromium.org/developers/design-documents/chromeviews
>
> > To do this I have created a new solution and an empty project. I have
> > then added the demonstration code, and in the project settings added
> > the additional include/lib directories (which I copied from an Exe
> > project from the Chromium trunk).
>
> > However, when I try to build the project, I get the following
> > compilation error:
>
> > 1>c:\chromium\src\quick_test\quick_test\views\main_window.cc(4) :
> > fatal error C1083: Cannot open include file: 'chrome/common/gfx/
> > chrome_canvas.h': No such file or directory
>
> > What steps are required to create a new solution/project of this
> > nature? I would really like to use the views API that Chromium has to
> > offer.
>
> > Many thanks,
> > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Getting Started with a New Project

2009-07-19 Thread Kruncher

For the purposes of practice I am trying to create an empty Win32 Exe
project that uses the demonstration code from:

http://dev.chromium.org/developers/design-documents/chromeviews

To do this I have created a new solution and an empty project. I have
then added the demonstration code, and in the project settings added
the additional include/lib directories (which I copied from an Exe
project from the Chromium trunk).

However, when I try to build the project, I get the following
compilation error:

1>c:\chromium\src\quick_test\quick_test\views\main_window.cc(4) :
fatal error C1083: Cannot open include file: 'chrome/common/gfx/
chrome_canvas.h': No such file or directory

What steps are required to create a new solution/project of this
nature? I would really like to use the views API that Chromium has to
offer.

Many thanks,
Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Creating a Custom View

2009-07-15 Thread Kruncher

Thanks for all of your help, it is much appreciated!


On 15 July, 12:39, PhistucK  wrote:
> dev.chromium.org has a lot of info ("Getting around the source code" is an
> example).But in your case, you want it to start up without switches, you
> just want it to be your version from the beginning with no special attention
> (besides compiling).
>
> You cannot exactly 'upload the changes back to the Google servers', you can
> submit a patch that will incorporate your changes (little changes, do not
> bring up all of the changes because people review these patches), there is
> an explanation about this in dev.chromium.org too.
> One (or more) of the committers review your changes and if the changes were
> approved, they commit the change list (=patch).
>
> Before submitting a patch, you should first ask if this is possible, because
> maybe they are not ready for supporting multiple (external) branches yet.
>
> SVN should be fine about the changes, anyway, unless there are real
> conflicts.
> Just run "gclient sync" and everything will be fine (and if not, it will
> notify you with a confirmation and some options).
>
> About the switches, you can simply reverse the switch (with ! in the
> condition). But that will also give you the incognito features, which I am
> not sure you would really like to have.
>
> ☆PhistucK
>
>
>
> On Wed, Jul 15, 2009 at 13:33, Kruncher  wrote:
>
> > I wasn't aware that SVN manages changes within the content of a file.
> > I am relatively new to open source code, and have only ever used SVN
> > to download the Chromium trunk. I also did not realize that it was
> > possible to upload changes back to the Google servers.
>
> > I will have to read up on how SVN works. Perhaps there is a reserved
> > comment/macro that can be used to protect a range of code.
>
> > Across several of the projects there appears to be an interface which
> > is responsible for constructing the required browser based upon
> > command switches. This interface is able to switch between starting up
> > with the standard and incognito windows, so I thought perhaps there
> > would be a way to override this.
>
> > Do you know of any documentation which explains the architecture of
> > Chromium, and the purpose of the various projects and files?
>
> > On 15 July, 10:41, PhistucK  wrote:
> > > SVN usually manages to merge the changes you have made with the changes
> > from
> > > trunk, unless they have changed that same bit of code you have and then,
> > it
> > > says there is a conflict and lets you look at the differences. I modified
> > > things in the actual Chromium source, not in a new project.
>
> > > There was a thread about creating branches and they said it is better
> > > handled with GIT, though I have never used GIT and since almost all of my
> > > changes were only adding things\the code nearby the code I changes were
> > not
> > > changed, no conflicts occurred.
>
> > > If your changes can be incorporated into the code because most of what
> > they
> > > do is removing options, maybe you can even upload your changes to the
> > > Chromium source code (with #IF DEFINE YOUR_CUSTOM_CODE or something). But
> > > you have to ask them first, of course.
>
> > > ☆PhistucK
>
> > > On Wed, Jul 15, 2009 at 11:41, Kruncher  wrote:
>
> > > > Thanks for your fast reply!
>
> > > > When you made your changes, did you start with a new project, or did
> > > > you edit the Chromium browser itself?
>
> > > > I was considering just modifying the browser. My concern was that if I
> > > > wanted to update the Chromium trunk, I would need to redo my various
> > > > changes to the system.
>
> > > > Thanks again,
>
> > > > On 15 July, 09:31, PhistucK  wrote:
> > > > > It is actually pretty easy to do that, I guess.I changed chromium to
> > > > support
> > > > > another button in the toolbar with a keyboard shortcut and removed
> > the
> > > > > "About Chromium" menu really easily - and my knowledge in C++ is
> > nearly
> > > > > nonexistent (I only know the syntax since it is similar to
> > JavaScript).
>
> > > > > You should look at the code that uses the regular window and the code
> > > > that
> > > > > uses the incognito window (use the theme GRD files for hints to what
> > to
> > > > > search for, like the Incognito logo and its ID) and compare the two,
> > move

[chromium-dev] Re: Creating a Custom View

2009-07-15 Thread Kruncher

I wasn't aware that SVN manages changes within the content of a file.
I am relatively new to open source code, and have only ever used SVN
to download the Chromium trunk. I also did not realize that it was
possible to upload changes back to the Google servers.

I will have to read up on how SVN works. Perhaps there is a reserved
comment/macro that can be used to protect a range of code.

Across several of the projects there appears to be an interface which
is responsible for constructing the required browser based upon
command switches. This interface is able to switch between starting up
with the standard and incognito windows, so I thought perhaps there
would be a way to override this.

Do you know of any documentation which explains the architecture of
Chromium, and the purpose of the various projects and files?

On 15 July, 10:41, PhistucK  wrote:
> SVN usually manages to merge the changes you have made with the changes from
> trunk, unless they have changed that same bit of code you have and then, it
> says there is a conflict and lets you look at the differences. I modified
> things in the actual Chromium source, not in a new project.
>
> There was a thread about creating branches and they said it is better
> handled with GIT, though I have never used GIT and since almost all of my
> changes were only adding things\the code nearby the code I changes were not
> changed, no conflicts occurred.
>
> If your changes can be incorporated into the code because most of what they
> do is removing options, maybe you can even upload your changes to the
> Chromium source code (with #IF DEFINE YOUR_CUSTOM_CODE or something). But
> you have to ask them first, of course.
>
> ☆PhistucK
>
>
>
> On Wed, Jul 15, 2009 at 11:41, Kruncher  wrote:
>
> > Thanks for your fast reply!
>
> > When you made your changes, did you start with a new project, or did
> > you edit the Chromium browser itself?
>
> > I was considering just modifying the browser. My concern was that if I
> > wanted to update the Chromium trunk, I would need to redo my various
> > changes to the system.
>
> > Thanks again,
>
> > On 15 July, 09:31, PhistucK  wrote:
> > > It is actually pretty easy to do that, I guess.I changed chromium to
> > support
> > > another button in the toolbar with a keyboard shortcut and removed the
> > > "About Chromium" menu really easily - and my knowledge in C++ is nearly
> > > nonexistent (I only know the syntax since it is similar to JavaScript).
>
> > > You should look at the code that uses the regular window and the code
> > that
> > > uses the incognito window (use the theme GRD files for hints to what to
> > > search for, like the Incognito logo and its ID) and compare the two, move
> > > the things that fit you from incognito back into the regular window.
> > > The debugger and everything, you can leave them in the code, simply
> > remove
> > > all of the reference to them, like menu items (pretty easy to find),
> > > keyboard shortcuts and context menu items.
>
> > > ☆PhistucK
>
> > > On Wed, Jul 15, 2009 at 10:50, Kruncher  wrote:
>
> > > > Hi,
>
> > > > I would like to create a custom browser application based on the
> > > > Chromium source. I have downloaded and compiled the source (from the
> > > > "Chrome.sln" solution.
>
> > > > What I want to do is:
> > > >  - Create a new executable project.
> > > >  - Create a custom view that is similar to the "Incognito" view. I
> > > > would like the browser to start in this view when opened.
>
> > > > However, I do not want/need to include the regular or "Incognito"
> > > > views, and I want to strip out all of the JavaScript/DOM debugging
> > > > parts.
>
> > > > I would really appreciate it if someone could give me some guidelines.
> > > > I have had a read through some of the sources, and I have a rough idea
> > > > as to how the projects are structured.
>
> > > > Many thanks,
> > > > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Creating a Custom View

2009-07-15 Thread Kruncher

Thanks for your fast reply!

When you made your changes, did you start with a new project, or did
you edit the Chromium browser itself?

I was considering just modifying the browser. My concern was that if I
wanted to update the Chromium trunk, I would need to redo my various
changes to the system.

Thanks again,

On 15 July, 09:31, PhistucK  wrote:
> It is actually pretty easy to do that, I guess.I changed chromium to support
> another button in the toolbar with a keyboard shortcut and removed the
> "About Chromium" menu really easily - and my knowledge in C++ is nearly
> nonexistent (I only know the syntax since it is similar to JavaScript).
>
> You should look at the code that uses the regular window and the code that
> uses the incognito window (use the theme GRD files for hints to what to
> search for, like the Incognito logo and its ID) and compare the two, move
> the things that fit you from incognito back into the regular window.
> The debugger and everything, you can leave them in the code, simply remove
> all of the reference to them, like menu items (pretty easy to find),
> keyboard shortcuts and context menu items.
>
> ☆PhistucK
>
>
>
> On Wed, Jul 15, 2009 at 10:50, Kruncher  wrote:
>
> > Hi,
>
> > I would like to create a custom browser application based on the
> > Chromium source. I have downloaded and compiled the source (from the
> > "Chrome.sln" solution.
>
> > What I want to do is:
> >  - Create a new executable project.
> >  - Create a custom view that is similar to the "Incognito" view. I
> > would like the browser to start in this view when opened.
>
> > However, I do not want/need to include the regular or "Incognito"
> > views, and I want to strip out all of the JavaScript/DOM debugging
> > parts.
>
> > I would really appreciate it if someone could give me some guidelines.
> > I have had a read through some of the sources, and I have a rough idea
> > as to how the projects are structured.
>
> > Many thanks,
> > Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Creating a Custom View

2009-07-15 Thread Kruncher

Hi,

I would like to create a custom browser application based on the
Chromium source. I have downloaded and compiled the source (from the
"Chrome.sln" solution.

What I want to do is:
 - Create a new executable project.
 - Create a custom view that is similar to the "Incognito" view. I
would like the browser to start in this view when opened.

However, I do not want/need to include the regular or "Incognito"
views, and I want to strip out all of the JavaScript/DOM debugging
parts.

I would really appreciate it if someone could give me some guidelines.
I have had a read through some of the sources, and I have a rough idea
as to how the projects are structured.

Many thanks,
Lea Hayes
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Using Chromium Source Code?

2009-07-12 Thread Kruncher

Thanks for all of your input.

I have no intention of keeping the Chromium name nor logo (unless,
obviously, I come across a requirement in one of the license
agreements). I will be replacing that with my own logo.

Thanks again!
Lea Hayes


On 12 July, 21:07, Evan Stade  wrote:
> On Thu, Jul 9, 2009 at 8:39 AM, dhhwai wrote:
>
> > Well, the Chromium _source code_ is open source.
>
> > But my guess is I don't think you can use the Chromium name nor logo
> > in any personally distributed software.
>
> I'm not sure what you mean by this, as there are already chromium
> packages being distributed by groups who are not Google. They call it
> chromium and use the blue/silver icon. But I can't see why he'd want
> to reuse that name anyway if he's making such drastic changes.
>
>
>
> > Besides, I don't expect that
> > you will since you want to make your own commercial software package.
>
> > On Jul 9, 6:56 am, PhistucK  wrote:
> >> Not really, the open source Chrome is Chromium for a reason, so you could
> >> use it.As far as I know, there are no closed copyrights for the Chromium
> >> logo or name.
> >> (Could be mistaking, though.)
>
> >> ☆PhistucK
>
> >> On Thu, Jul 9, 2009 at 16:46, Kruncher  wrote:
>
> >> > Thanks for the link of terms, and for your confirmation.
>
> >> > From what I can see in the terms, Chromium is primarily covered by the
> >> > BSD and LGPL licences, so I can't see a problem there. I guess my
> >> > primary concern is with copyright if I am reworking the "Chromium"
> >> > browser part of the project to meet my own needs.
>
> >> > On 8 July, 03:43, Evan Martin  wrote:
> >> > > On Tue, Jul 7, 2009 at 2:59 PM, Kruncher wrote:
> >> > > > I would like to use the Chromium source code as the basis to a custom
> >> > > > documentation viewer. The following outlines what I would like to do
> >> > > > with the source:
>
> >> > > > - Add sidebar panels to left/right of each Chromium window.
> >> > > > - Remove unwanted features from drop-down menu buttons on main tool
> >> > > > strip.
> >> > > > - Remove "Inspector" and the various web developer and debugging 
> >> > > > tools
> >> > > > from interface.
> >> > > > - Replace search functionality with custom search functionality in 
> >> > > > URI
> >> > > > address bar.
> >> > > > - Add a custom scheme name "my-scheme:something/a/b/c.html"
> >> > > > - Adjust "About" dialog box to reflect title of product with logo and
> >> > > > product artwork.
> >> > > > - Change colour scheme of the browser.
>
> >> > > > Whilst the application will still be able to access the webpages from
> >> > > > the Internet, it will be used primarily for viewing offline content.
>
> >> > > > I have a couple of questions:
>
> >> > > > 1. Would this be compatible with the associated open source license?
> >> > > > 2. Could the product be distributed as a part of a commercial 
> >> > > > package?
>
> >> > >http://code.google.com/chromium/terms.htmldescribesthelicenses of
> >> > > the code.  In general, the answer to both of your questions is "yes"
> >> > > -- applications like yours are part of our intent in releasing the
> >> > > code -- but you should definitely check with a lawyer before making a
> >> > > commercial release, and I am not a lawyer.
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Using Chromium Source Code?

2009-07-09 Thread Kruncher

Thanks for the link of terms, and for your confirmation.

>From what I can see in the terms, Chromium is primarily covered by the
BSD and LGPL licences, so I can't see a problem there. I guess my
primary concern is with copyright if I am reworking the "Chromium"
browser part of the project to meet my own needs.


On 8 July, 03:43, Evan Martin  wrote:
> On Tue, Jul 7, 2009 at 2:59 PM, Kruncher wrote:
> > I would like to use the Chromium source code as the basis to a custom
> > documentation viewer. The following outlines what I would like to do
> > with the source:
>
> > - Add sidebar panels to left/right of each Chromium window.
> > - Remove unwanted features from drop-down menu buttons on main tool
> > strip.
> > - Remove "Inspector" and the various web developer and debugging tools
> > from interface.
> > - Replace search functionality with custom search functionality in URI
> > address bar.
> > - Add a custom scheme name "my-scheme:something/a/b/c.html"
> > - Adjust "About" dialog box to reflect title of product with logo and
> > product artwork.
> > - Change colour scheme of the browser.
>
> > Whilst the application will still be able to access the webpages from
> > the Internet, it will be used primarily for viewing offline content.
>
> > I have a couple of questions:
>
> > 1. Would this be compatible with the associated open source license?
> > 2. Could the product be distributed as a part of a commercial package?
>
> http://code.google.com/chromium/terms.htmldescribes the licenses of
> the code.  In general, the answer to both of your questions is "yes"
> -- applications like yours are part of our intent in releasing the
> code -- but you should definitely check with a lawyer before making a
> commercial release, and I am not a lawyer.
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Using Chromium Source Code?

2009-07-07 Thread Kruncher

Hi all,

I would like to use the Chromium source code as the basis to a custom
documentation viewer. The following outlines what I would like to do
with the source:

- Add sidebar panels to left/right of each Chromium window.
- Remove unwanted features from drop-down menu buttons on main tool
strip.
- Remove "Inspector" and the various web developer and debugging tools
from interface.
- Replace search functionality with custom search functionality in URI
address bar.
- Add a custom scheme name "my-scheme:something/a/b/c.html"
- Adjust "About" dialog box to reflect title of product with logo and
product artwork.
- Change colour scheme of the browser.

Whilst the application will still be able to access the webpages from
the Internet, it will be used primarily for viewing offline content.

I have a couple of questions:

1. Would this be compatible with the associated open source license?
2. Could the product be distributed as a part of a commercial package?

Many thanks,
Lea Hayes

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