summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_browser.gypi
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 16:03:53 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-13 16:03:53 +0000
commit4672de6247fe7a865b2abeaac1b4a76c9369b7a3 (patch)
treeeaa314bbb797dae5152877b1ad170f44d1eb51b4 /chrome/chrome_browser.gypi
parent37ae86f0c4b50dc83b13da17ae1a9ef7083fa76f (diff)
downloadchromium_src-4672de6247fe7a865b2abeaac1b4a76c9369b7a3.zip
chromium_src-4672de6247fe7a865b2abeaac1b4a76c9369b7a3.tar.gz
chromium_src-4672de6247fe7a865b2abeaac1b4a76c9369b7a3.tar.bz2
Split the hierarchy.
* Widget ---- Now recognizes a supplied NativeWidget via InitParams. If this is specified then a default one is not created. Is now created directly rather than using a factory. NativeWidget creation is not performed until Init() is called. This means some functions that rely on a NativeWidget must not be called until _AFTER_ Init() (explains some of the function call reordering in this CL, e.g. moving SetOpacity() until after Init()). ResetLastMouseMovedFlag() moved to this API so that BaseTabStrip can call it in a cross-platform way. Made last remaining unimplemented methods on Widget pass-thru to NativeWidget implementations. * WidgetWin/WidgetGtk ---- The NativeWidget implementations now both require a NativeWidgetDelegate implementation upon construction. This is passed through the constructor by the static factory method NativeWidget::CreateNativeWidget and by subclasses such as WindowWin, BubbleWidgetWin, etc. Some classes that are constructed directly (e.g. LockWindow, in ChromeOS) never have a Widget created for them, so they create the Widget themselves in their base class initializer. Code in these classes (and their WindowWin/WindowGtk, BrowserFrameWin, BrowserFrameGtk subclasses) must now call GetWidget() etc to call Widget API methods since they are no longer subclasses. static_casting to this (and derived) types must now be done on the Widget's native_widget(). GetWindow() is renamed to GetContainingWindow() to avoid naming conflicts. * Window ---- Window is now a subclass of Widget. Now recognizes a supplied NativeWindow via InitParams. If this is specified then a default one is not created. Window::CloseWindow becomes an override of Widget::Close. CloseAllSecondaryWindows() becomes CloseAllSecondaryWidgets() and moves to widget.h IsAppWindow() is removed and replaced by set_is_secondary_widget on Widget. * MenuHost ---- Subclasses Widget now. * TabContentsViewViews ---- It looks like the Gtk-views code here was still using the old implementation of the Native version of this class - i.e. a class that subclassed TabContentsView AND WidgetGtk. A no-no. I had to write NativeTabContentsViewGtk, which is almost identical to NativeTabContentsViewWin with the Gtk bits of TabContentsViewGtk thrown in. * BrowserFrame ---- Platform-specific functionality is now restricted to BrowserFrameWin/BrowserFrameGtk behind a NativeBrowserFrame interface. Construction is exposed via a static factory method on NativeBrowserFrame. BrowserFrame becomes a concrete class that now subclasses Window. As a result, it no longer needs a GetWindow() accessor method, so people with a BrowserFrame* can just call Window methods directly on it. It is constructed directly, replacing the BrowserFrame::Create() method. NativeBrowserFrameDelegate is no longer needed. BrowserFrameChromeos is simpler as a couple of #ifdefs in BrowserFrame, so I got rid of that too. * AutocompletePopupWin/Gtk ---- No longer required. AutocompletePopupContentsView now just uses a Widget directly. * There is some lingering ugliness: - If you set a native_window field on Window::InitParams you must also manually set widget_init_params.native_widget. I will make InitParams do more of this automatically later. - It'd be nice for the ContentsView to be specified via InitParams. I'll get to this later. - NativeBrowserFrame could probably disappear as an interface. It only exists to provide a couple of methods that may be implemented in other ways. - delete_on_destroy should now be an ownership directionality enum. I will do this later. - Secondary-widgetness should somehow be inferred from transience. Later. - set_focus_on_creation for both the NativeWidgets should probably move to Widget if it is really needed. - WidgetWin/Gtk::SetInitialFocus seems like it could move to Widget. - I need to clean up function order in some cases. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7012006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_browser.gypi')
-rw-r--r--chrome/chrome_browser.gypi22
1 files changed, 8 insertions, 14 deletions
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index edd0a82..e64de74 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -410,8 +410,6 @@
'browser/chromeos/external_metrics.h',
'browser/chromeos/external_protocol_dialog.cc',
'browser/chromeos/external_protocol_dialog.h',
- 'browser/chromeos/frame/browser_frame_chromeos.cc',
- 'browser/chromeos/frame/browser_frame_chromeos.h',
'browser/chromeos/frame/browser_frame_view_chromeos.cc',
'browser/chromeos/frame/browser_frame_view_chromeos.h',
'browser/chromeos/frame/browser_non_client_frame_view_factory_chromeos.cc',
@@ -2871,10 +2869,6 @@
'browser/ui/views/appcache_info_view.h',
'browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc',
'browser/ui/views/autocomplete/autocomplete_popup_contents_view.h',
- 'browser/ui/views/autocomplete/autocomplete_popup_gtk.cc',
- 'browser/ui/views/autocomplete/autocomplete_popup_gtk.h',
- 'browser/ui/views/autocomplete/autocomplete_popup_win.cc',
- 'browser/ui/views/autocomplete/autocomplete_popup_win.h',
'browser/ui/views/autocomplete/autocomplete_result_view.cc',
'browser/ui/views/autocomplete/autocomplete_result_view.h',
'browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc',
@@ -3137,6 +3131,8 @@
'browser/ui/views/tab_contents/native_tab_contents_container_win.h',
'browser/ui/views/tab_contents/native_tab_contents_view.h',
'browser/ui/views/tab_contents/native_tab_contents_view_delegate.h',
+ 'browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc',
+ 'browser/ui/views/tab_contents/native_tab_contents_view_gtk.h',
'browser/ui/views/tab_contents/native_tab_contents_view_win.cc',
'browser/ui/views/tab_contents/native_tab_contents_view_win.h',
'browser/ui/views/tab_contents/render_view_context_menu_views.cc',
@@ -3149,8 +3145,6 @@
'browser/ui/views/tab_contents/tab_contents_container_views.h',
'browser/ui/views/tab_contents/tab_contents_drag_win.cc',
'browser/ui/views/tab_contents/tab_contents_drag_win.h',
- 'browser/ui/views/tab_contents/tab_contents_view_gtk.cc',
- 'browser/ui/views/tab_contents/tab_contents_view_gtk.h',
'browser/ui/views/tab_contents/tab_contents_view_touch.cc',
'browser/ui/views/tab_contents/tab_contents_view_touch.h',
'browser/ui/views/tab_contents/tab_contents_view_views.cc',
@@ -3570,8 +3564,6 @@
['exclude', '^browser/renderer_host/render_widget_host_view_gtk.h'],
['exclude', '^browser/ui/views/frame/browser_non_client_frame_view_factory_gtk.cc'],
['exclude', '^browser/ui/views/handle_web_keyboard_event_gtk.cc'],
- ['exclude', '^browser/views/tab_contents/tab_contents_view_gtk.cc'],
- ['exclude', '^browser/views/tab_contents/tab_contents_view_gtk.h'],
['exclude', '^browser/chromeos/input_method/candidate_window.cc'],
['exclude', '^browser/chromeos/input_method/candidate_window.h'],
],
@@ -4146,14 +4138,18 @@
['include', '^browser/ui/views/status_icons/status_tray_gtk.cc'],
['include', '^browser/ui/views/tab_contents/native_tab_contents_container_gtk.cc'],
['include', '^browser/ui/views/tab_contents/native_tab_contents_container_gtk.h'],
+ ['include', '^browser/ui/views/tab_contents/native_tab_contents_view_gtk.cc'],
+ ['include', '^browser/ui/views/tab_contents/native_tab_contents_view_gtk.h'],
+ ['include', '^browser/ui/views/tab_contents/native_tab_contents_view.h'],
+ ['include', '^browser/ui/views/tab_contents/native_tab_contents_view_delegate.h'],
['include', '^browser/ui/views/tab_contents/render_view_context_menu_views.cc'],
['include', '^browser/ui/views/tab_contents/render_view_context_menu_views.h'],
['include', '^browser/ui/views/tab_contents/tab_contents_container.cc'],
['include', '^browser/ui/views/tab_contents/tab_contents_container.h'],
['include', '^browser/ui/views/tab_contents/tab_contents_container_native.cc'],
['include', '^browser/ui/views/tab_contents/tab_contents_container_native.h'],
- ['include', '^browser/ui/views/tab_contents/tab_contents_view_gtk.cc'],
- ['include', '^browser/ui/views/tab_contents/tab_contents_view_gtk.h'],
+ ['include', '^browser/ui/views/tab_contents/tab_contents_view_views.cc'],
+ ['include', '^browser/ui/views/tab_contents/tab_contents_view_views.h'],
['include', '^browser/ui/views/tab_icon_view.cc'],
['include', '^browser/ui/views/tab_icon_view.h'],
['include', '^browser/ui/views/tabs/abstract_tab_strip_view.h'],
@@ -4290,8 +4286,6 @@
['exclude', '^browser/ui/views/tabs/tab_strip_factory.cc'],
['exclude', '^browser/ui/views/tab_contents/tab_contents_container_native.cc'],
['exclude', '^browser/ui/views/tab_contents/tab_contents_container_native.h'],
- ['exclude', '^browser/ui/views/tab_contents/tab_contents_view_gtk.cc'],
- ['exclude', '^browser/ui/views/tab_contents/tab_contents_view_gtk.h'],
],
}],
['OS=="linux" and chromeos==1',{