Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Issue 10913243: extensions: Add ExtensionView interface. (Closed)

Created:
8 years, 3 months ago by tfarina
Modified:
8 years, 3 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, tfarina
Visibility:
Public.

Description

extensions: Add ExtensionView interface. We abstract all ports (android, cocoa, gtk and views) behind this interface. That way chrome/browser/extensions/ does not need to include any platform-specific ui header files. BUG=125846 R=ben@chromium.org,aa@chromium.org,rsesek@chromium.org,erg@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=158199

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : fix header include guards #

Patch Set 4 : Create factory function #

Patch Set 5 : hook it up #

Patch Set 6 : add GetBrowser() to interface #

Patch Set 7 : add ResizeDueToAutoResize to interface #

Patch Set 8 : extension_view_gtk.h fixes #

Patch Set 9 : add RenderViewCreate() to interface and override it #

Patch Set 10 : android fixes #

Patch Set 11 : add DidStopLoading to interface and override it #

Patch Set 12 : rm platform specific includes from extension_host.h #

Patch Set 13 : instantiate the gtk version #

Patch Set 14 : instantiate android and mac too #

Total comments: 1

Patch Set 15 : GetExtensionView() #

Patch Set 16 : const GetBrowser() #

Patch Set 17 : some gtk fixes #

Patch Set 18 : mac fix #

Patch Set 19 : add GetNativeView to interface, will override it later #

Total comments: 4

Patch Set 20 : static_cast it? #

Patch Set 21 : fix typo #

Patch Set 22 : rm extra parenteses #

Patch Set 23 : override GetNativeView() #

Patch Set 24 : add cross-platform extension_view_container interface #

Patch Set 25 : more ExtensionViewContainer interface work #

Patch Set 26 : override GetNativeView() in android port #

Patch Set 27 : add SetContainer to interface #

Patch Set 28 : mv render_view_host() to private section in both gtk and views #

Patch Set 29 : rm SetIsClipped from views api #

Patch Set 30 : override SetContainer in android port #

Patch Set 31 : forgot to forward declare ExtensionView in container interface #

Patch Set 32 : Container -> ExtensionViewContainer #

Patch Set 33 : fixes for mac and linux_chromeos #

Patch Set 34 : virtual dtor for cocoa and gtk ports #

Total comments: 1

Patch Set 35 : more gtk fixes #

Patch Set 36 : fix inheritance in extension_popup_gtk #

Patch Set 37 : gtk port now compiles - yay #

Patch Set 38 : fix android port #

Patch Set 39 : fixes for cocoa port #

Patch Set 40 : add WindowFrameChanged to interface - that should make cocoa port compile #

Patch Set 41 : last mac fix #

Total comments: 4

Patch Set 42 : add docs #

Patch Set 43 : fixes for Ben #

Total comments: 2

Patch Set 44 : weak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+532 lines, -384 lines) Patch
M chrome/browser/extensions/extension_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -40 lines 0 comments Download
M chrome/browser/extensions/extension_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 12 chunks +37 lines, -34 lines 0 comments Download
M chrome/browser/extensions/extension_host_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +3 lines, -1 line 0 comments Download
A chrome/browser/extensions/extension_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_view_container.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/extensions/extension_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 1 chunk +15 lines, -9 lines 0 comments Download
M chrome/browser/ui/android/extensions/extension_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 2 chunks +44 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 5 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 3 chunks +15 lines, -48 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 6 chunks +41 lines, -20 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_popup_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_popup_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 5 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 3 chunks +16 lines, -29 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 3 chunks +47 lines, -15 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/shell_window_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/infobars/extension_infobar_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/infobars/extension_infobar_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 4 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_dialog.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 8 chunks +21 lines, -12 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_popup.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_popup.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_view_views.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 4 chunks +21 lines, -37 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_view_views.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 7 chunks +94 lines, -84 lines 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3 chunks +10 lines, -6 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
tfarina
Hi Ben, Aaron, this is not ready yet for review. It barely compiles yet, but ...
8 years, 3 months ago (2012-09-13 03:23:07 UTC) #1
Ben Goodger (Google)
Nice refactor! I like the direction.
8 years, 3 months ago (2012-09-13 15:36:53 UTC) #2
tfarina
http://codereview.chromium.org/10913243/diff/12043/chrome/browser/ui/views/extensions/extension_view_views.h File chrome/browser/ui/views/extensions/extension_view_views.h (right): http://codereview.chromium.org/10913243/diff/12043/chrome/browser/ui/views/extensions/extension_view_views.h#newcode25 chrome/browser/ui/views/extensions/extension_view_views.h:25: public views::NativeViewHost { Looks like we will need to ...
8 years, 3 months ago (2012-09-14 01:56:29 UTC) #3
tfarina
http://codereview.chromium.org/10913243/diff/11015/chrome/browser/ui/views/extensions/extension_dialog.cc File chrome/browser/ui/views/extensions/extension_dialog.cc (right): http://codereview.chromium.org/10913243/diff/11015/chrome/browser/ui/views/extensions/extension_dialog.cc#newcode106 chrome/browser/ui/views/extensions/extension_dialog.cc:106: host->GetExtensionView()->set_background( Aaron, Ben, any idea how I will get ...
8 years, 3 months ago (2012-09-14 13:36:59 UTC) #4
Aaron Boodman
sgtm http://codereview.chromium.org/10913243/diff/11015/chrome/browser/extensions/extension_host.h File chrome/browser/extensions/extension_host.h (right): http://codereview.chromium.org/10913243/diff/11015/chrome/browser/extensions/extension_host.h#newcode54 chrome/browser/extensions/extension_host.h:54: void SetExtensionView(ExtensionView* view); Nit: These should be unix_hacker ...
8 years, 3 months ago (2012-09-16 01:07:38 UTC) #5
tfarina
http://codereview.chromium.org/10913243/diff/14026/chrome/browser/ui/views/extensions/extension_popup.cc File chrome/browser/ui/views/extensions/extension_popup.cc (right): http://codereview.chromium.org/10913243/diff/14026/chrome/browser/ui/views/extensions/extension_popup.cc#newcode80 chrome/browser/ui/views/extensions/extension_popup.cc:80: static_cast<ExtensionViewViews*>(host->GetExtensionView()); Aaron, Ben, the problem of doing this is ...
8 years, 3 months ago (2012-09-16 10:54:02 UTC) #6
tfarina
Guys this is almost ready for review. Ben -> chrome/browser/ui/views/ and overall high-level review. Aaron ...
8 years, 3 months ago (2012-09-16 16:20:42 UTC) #7
tfarina
Bots are green on all ports. http://codereview.chromium.org/10913243/diff/11015/chrome/browser/extensions/extension_host.h File chrome/browser/extensions/extension_host.h (right): http://codereview.chromium.org/10913243/diff/11015/chrome/browser/extensions/extension_host.h#newcode54 chrome/browser/extensions/extension_host.h:54: void SetExtensionView(ExtensionView* view); ...
8 years, 3 months ago (2012-09-16 22:12:33 UTC) #8
tfarina
CL description updated!
8 years, 3 months ago (2012-09-17 01:47:50 UTC) #9
Ben Goodger (Google)
http://codereview.chromium.org/10913243/diff/6085/chrome/browser/extensions/extension_view.h File chrome/browser/extensions/extension_view.h (right): http://codereview.chromium.org/10913243/diff/6085/chrome/browser/extensions/extension_view.h#newcode25 chrome/browser/extensions/extension_view.h:25: class ExtensionView { It'd be good to document this ...
8 years, 3 months ago (2012-09-17 16:07:16 UTC) #10
tfarina
Ben, please, take another look. http://codereview.chromium.org/10913243/diff/6085/chrome/browser/extensions/extension_view.h File chrome/browser/extensions/extension_view.h (right): http://codereview.chromium.org/10913243/diff/6085/chrome/browser/extensions/extension_view.h#newcode25 chrome/browser/extensions/extension_view.h:25: class ExtensionView { On ...
8 years, 3 months ago (2012-09-19 01:21:39 UTC) #11
tfarina
ping?
8 years, 3 months ago (2012-09-20 02:04:28 UTC) #12
memyy
good'. memyi04@ovi.com
8 years, 3 months ago (2012-09-20 03:07:27 UTC) #13
memyy
2012/9/20, metanata4@gmail.com <metanata4@gmail.com>: > good'. memyi04@ovi.com > > https://chromiumcodereview.appspot.com/10913243/ >
8 years, 3 months ago (2012-09-20 07:44:43 UTC) #14
Ben Goodger (Google)
lgtm
8 years, 3 months ago (2012-09-21 16:04:32 UTC) #15
Robert Sesek
cocoa/ LGTM https://codereview.chromium.org/10913243/diff/18001/chrome/browser/ui/cocoa/extensions/extension_view_mac.h File chrome/browser/ui/cocoa/extensions/extension_view_mac.h (right): https://codereview.chromium.org/10913243/diff/18001/chrome/browser/ui/cocoa/extensions/extension_view_mac.h#newcode67 chrome/browser/ui/cocoa/extensions/extension_view_mac.h:67: ExtensionViewContainer* container_; // Not owned. "Not owned." ...
8 years, 3 months ago (2012-09-21 18:06:51 UTC) #16
tfarina
8 years, 3 months ago (2012-09-21 20:42:47 UTC) #17
https://codereview.chromium.org/10913243/diff/18001/chrome/browser/ui/cocoa/e...
File chrome/browser/ui/cocoa/extensions/extension_view_mac.h (right):

https://codereview.chromium.org/10913243/diff/18001/chrome/browser/ui/cocoa/e...
chrome/browser/ui/cocoa/extensions/extension_view_mac.h:67:
ExtensionViewContainer* container_;  // Not owned.
On 2012/09/21 18:06:51, rsesek wrote:
> "Not owned." -> "weak" is the convention (c.f. lines 55, 57)

Done.

Powered by Google App Engine
This is Rietveld 408576698