[Webkit-unassigned] [Bug 96499] [EFL] Remove some parameters in browserCreate()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 12 19:48:50 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=96499





--- Comment #6 from Seokju Kwon <seokju.kwon at samsung.com>  2012-09-12 19:49:16 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > Although EWebLauncher is simple browser, I still think we need to avoid to use global variable. When we need to add more features or functionality, improper global variable may make spaghetti code.
> 
> I agree that reducing global variables is better.
> 
> But in this case, I think that there is not simple way to keep and pass the settings for each view without keeping global setting information.
> 
> It's because we get the setting information via command line argument.
> After getting settings in main, I think that we should have at least one copy (global variable) to provide them to each browserViews.

How about adding 'settings' to a struct of ELauncher?

+typedef struct _ELauncher_Settings {
+    const char *userAgent;
+    const char *engine;
+    const char *backingStore;
+    unsigned char isFlattening;
+    unsigned char isFullscreen;
+    const char *databasePath;
+} ELauncher_Settings;
+
 typedef struct _ELauncher {
     Ecore_Evas *ee;
     Evas *evas;
     Evas_Object *bg;
     Evas_Object *browser;
     Url_Bar *url_bar;
-    const char *theme;
-    const char *userAgent;
-    const char *backingStore;
-    unsigned char isFlattening;
+    ELauncher_Settings *settings;
 } ELauncher;

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list