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

Issue 237533008: Refactor GuestView. (Closed)

Created:
6 years, 8 months ago by Xi Han
Modified:
6 years, 7 months ago
Reviewers:
Fady Samuel, Dan Beam, sky
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

1. Handle the case of empty embedder_extension_id in guestview.h. 2. Introduce a template class GuestView<T> to handle the *guestview-specific functions in guestview.h: . Rename GuestView to GuestViewBase, introduce GuestView<T> class, and move *ViewGuest-specific functions to GuestView<T>: -- FromWebContents<T>(...) -- From<T>(...). . Introduce a template member function As() in GuestViewBase to replace all of the As*View functions. 3. In each derived *ViewGuest class , e.g., WebViewGuest & AdViewGuest, define a static variable to show its view type (string). BUG=351824 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266297 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267079

Patch Set 1 #

Total comments: 4

Patch Set 2 : Introduce template class GuestView. #

Total comments: 6

Patch Set 3 : Changes are made. #

Total comments: 2

Patch Set 4 : Rename files and folders in chrome/browser/guestview. #

Total comments: 1

Patch Set 5 : Remove static iniitalizer by chaning static constent string to char[]. #

Total comments: 5

Patch Set 6 : Solve conflicts. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -3314 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 5 chunks +18 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/declarative/declarative_api.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/webview/webview_api.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/menu_manager.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/geolocation/chrome_geolocation_permission_context.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/guest_view/OWNERS View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/browser/guest_view/ad_view/ad_view_constants.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/ad_view/ad_view_constants.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/guest_view/ad_view/ad_view_guest.h View 1 2 3 4 3 chunks +6 lines, -11 lines 0 comments Download
A + chrome/browser/guest_view/ad_view/ad_view_guest.cc View 1 2 3 4 4 chunks +8 lines, -25 lines 0 comments Download
A chrome/browser/guest_view/guest_view.h View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A + chrome/browser/guest_view/guest_view_base.h View 1 2 3 4 8 chunks +36 lines, -43 lines 0 comments Download
A + chrome/browser/guest_view/guest_view_base.cc View 1 2 3 4 8 chunks +67 lines, -85 lines 0 comments Download
A + chrome/browser/guest_view/guest_view_constants.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/guest_view_constants.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/guest_view/web_view/context_menu_content_type_web_view.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/context_menu_content_type_web_view.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/guest_view/web_view/javascript_dialog_helper.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/javascript_dialog_helper.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
A + chrome/browser/guest_view/web_view/plugin_permission_helper.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/plugin_permission_helper.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_constants.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_constants.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_find_helper.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_find_helper.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_guest.h View 1 2 3 4 3 chunks +9 lines, -13 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 19 chunks +38 lines, -53 lines 0 comments Download
A + chrome/browser/guest_view/web_view/web_view_permission_types.h View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
D chrome/browser/guestview/OWNERS View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
D chrome/browser/guestview/adview/adview_constants.h View 1 2 3 4 1 chunk +0 lines, -19 lines 0 comments Download
D chrome/browser/guestview/adview/adview_constants.cc View 1 2 3 4 1 chunk +0 lines, -13 lines 0 comments Download
D chrome/browser/guestview/adview/adview_guest.h View 1 2 3 4 1 chunk +0 lines, -54 lines 0 comments Download
D chrome/browser/guestview/adview/adview_guest.cc View 1 2 3 4 1 chunk +0 lines, -75 lines 0 comments Download
D chrome/browser/guestview/guestview.h View 1 2 3 4 1 chunk +0 lines, -150 lines 0 comments Download
D chrome/browser/guestview/guestview.cc View 1 2 3 4 1 chunk +0 lines, -223 lines 0 comments Download
D chrome/browser/guestview/guestview_constants.h View 1 2 3 4 1 chunk +0 lines, -28 lines 0 comments Download
D chrome/browser/guestview/guestview_constants.cc View 1 2 3 4 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/guestview/webview/context_menu_content_type_webview.h View 1 2 3 1 chunk +0 lines, -31 lines 0 comments Download
D chrome/browser/guestview/webview/context_menu_content_type_webview.cc View 1 2 3 1 chunk +0 lines, -32 lines 0 comments Download
D chrome/browser/guestview/webview/javascript_dialog_helper.h View 1 2 3 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/guestview/webview/javascript_dialog_helper.cc View 1 2 3 1 chunk +0 lines, -104 lines 0 comments Download
D chrome/browser/guestview/webview/plugin_permission_helper.h View 1 2 3 4 1 chunk +0 lines, -48 lines 0 comments Download
D chrome/browser/guestview/webview/plugin_permission_helper.cc View 1 2 3 4 1 chunk +0 lines, -109 lines 0 comments Download
D chrome/browser/guestview/webview/webview_constants.h View 1 2 3 4 1 chunk +0 lines, -89 lines 0 comments Download
D chrome/browser/guestview/webview/webview_constants.cc View 1 2 3 4 1 chunk +0 lines, -83 lines 0 comments Download
D chrome/browser/guestview/webview/webview_find_helper.h View 1 2 3 1 chunk +0 lines, -186 lines 0 comments Download
M chrome/browser/guestview/webview/webview_find_helper.cc View 1 2 3 1 chunk +0 lines, -279 lines 0 comments Download
D chrome/browser/guestview/webview/webview_guest.h View 1 2 3 4 1 chunk +0 lines, -327 lines 0 comments Download
D chrome/browser/guestview/webview/webview_guest.cc View 1 2 3 4 1 chunk +0 lines, -1038 lines 0 comments Download
D chrome/browser/guestview/webview/webview_permission_types.h View 1 2 3 4 1 chunk +0 lines, -30 lines 0 comments Download
M chrome/browser/renderer_context_menu/context_menu_content_type_factory.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 2 chunks +23 lines, -22 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
Xi Han
https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/guestview.h File chrome/browser/guestview/guestview.h (right): https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/guestview.h#newcode86 chrome/browser/guestview/guestview.h:86: template <class T> We do not want a bunch ...
6 years, 8 months ago (2014-04-15 21:35:37 UTC) #1
Fady Samuel
https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc File chrome/browser/guestview/webview/webview_guest.cc (right): https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc#newcode295 chrome/browser/guestview/webview/webview_guest.cc:295: GuestView::Type WebViewGuest::GetViewType() const { return Type(); } I've been ...
6 years, 8 months ago (2014-04-16 02:47:44 UTC) #2
Xi Han
https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc File chrome/browser/guestview/webview/webview_guest.cc (right): https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc#newcode295 chrome/browser/guestview/webview/webview_guest.cc:295: GuestView::Type WebViewGuest::GetViewType() const { return Type(); } Does it ...
6 years, 8 months ago (2014-04-16 13:33:32 UTC) #3
Xi Han
https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc File chrome/browser/guestview/webview/webview_guest.cc (right): https://codereview.chromium.org/237533008/diff/1/chrome/browser/guestview/webview/webview_guest.cc#newcode295 chrome/browser/guestview/webview/webview_guest.cc:295: GuestView::Type WebViewGuest::GetViewType() const { return Type(); } As discussed ...
6 years, 8 months ago (2014-04-16 17:42:19 UTC) #4
Xi Han
6 years, 8 months ago (2014-04-23 19:21:39 UTC) #5
Fady Samuel
https://codereview.chromium.org/237533008/diff/10001/chrome/browser/guestview/guestview.h File chrome/browser/guestview/guestview.h (left): https://codereview.chromium.org/237533008/diff/10001/chrome/browser/guestview/guestview.h#oldcode11 chrome/browser/guestview/guestview.h:11: #include "base/values.h" Do you need this? https://codereview.chromium.org/237533008/diff/10001/chrome/browser/guestview/guestview.h#oldcode13 chrome/browser/guestview/guestview.h:13: #include ...
6 years, 8 months ago (2014-04-23 21:48:53 UTC) #6
Xi Han
https://codereview.chromium.org/237533008/diff/10001/chrome/browser/guestview/guestview.h File chrome/browser/guestview/guestview.h (left): https://codereview.chromium.org/237533008/diff/10001/chrome/browser/guestview/guestview.h#oldcode11 chrome/browser/guestview/guestview.h:11: #include "base/values.h" On 2014/04/23 21:48:54, Fady Samuel wrote: > ...
6 years, 8 months ago (2014-04-24 15:40:58 UTC) #7
Fady Samuel
guestview lgtm. Please add sky@ for chrome OWNER review. Thanks.
6 years, 8 months ago (2014-04-24 15:42:18 UTC) #8
Xi Han
sky: Please take a look at the changes in the following files: 1. chrome/browser/chrome_content_browser_client.cc 2. ...
6 years, 8 months ago (2014-04-24 15:46:20 UTC) #9
sky
https://codereview.chromium.org/237533008/diff/30001/chrome/browser/guestview/guestview.h File chrome/browser/guestview/guestview.h (right): https://codereview.chromium.org/237533008/diff/30001/chrome/browser/guestview/guestview.h#newcode11 chrome/browser/guestview/guestview.h:11: class GuestView : public GuestViewBase { Noticed this in ...
6 years, 8 months ago (2014-04-24 16:31:24 UTC) #10
Xi Han
https://codereview.chromium.org/237533008/diff/30001/chrome/browser/guestview/guestview.h File chrome/browser/guestview/guestview.h (right): https://codereview.chromium.org/237533008/diff/30001/chrome/browser/guestview/guestview.h#newcode11 chrome/browser/guestview/guestview.h:11: class GuestView : public GuestViewBase { On 2014/04/24 16:31:24, ...
6 years, 8 months ago (2014-04-24 18:14:49 UTC) #11
Fady Samuel
Still guest_view lgtm! Thanks for the mass rename! :-)
6 years, 8 months ago (2014-04-24 18:16:33 UTC) #12
sky
LGTM
6 years, 8 months ago (2014-04-24 18:17:20 UTC) #13
Xi Han
sky: please take another look at the renaming. Thanks!
6 years, 8 months ago (2014-04-24 18:17:43 UTC) #14
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 8 months ago (2014-04-24 18:49:33 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/50001
6 years, 8 months ago (2014-04-24 21:51:00 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-24 23:52:57 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-04-24 23:52:57 UTC) #18
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 8 months ago (2014-04-25 15:22:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/50001
6 years, 8 months ago (2014-04-25 21:44:52 UTC) #20
commit-bot: I haz the power
Change committed as 266297
6 years, 8 months ago (2014-04-26 00:11:24 UTC) #21
Dan Beam
this has added static initializers and broken sizes on the tree
6 years, 8 months ago (2014-04-26 03:00:10 UTC) #22
Dan Beam
https://codereview.chromium.org/237533008/diff/50001/chrome/browser/guest_view/ad_view/ad_view_guest.cc File chrome/browser/guest_view/ad_view/ad_view_guest.cc (right): https://codereview.chromium.org/237533008/diff/50001/chrome/browser/guest_view/ad_view/ad_view_guest.cc#newcode22 chrome/browser/guest_view/ad_view/ad_view_guest.cc:22: const std::string& AdViewGuest::Type = "adview"; ^ this just needs ...
6 years, 8 months ago (2014-04-26 03:04:40 UTC) #23
Xi Han
I keep Dan's changes and add the missing parts in the web_view_guest.h(cc). https://codereview.chromium.org/237533008/diff/80001/chrome/browser/guest_view/ad_view/ad_view_guest.cc File chrome/browser/guest_view/ad_view/ad_view_guest.cc ...
6 years, 7 months ago (2014-04-28 22:08:33 UTC) #24
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 7 months ago (2014-04-28 22:46:19 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/80001
6 years, 7 months ago (2014-04-28 22:46:50 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-28 23:35:27 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit tryserver.chromium on win_chromium_rel
6 years, 7 months ago (2014-04-28 23:35:27 UTC) #28
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 7 months ago (2014-04-28 23:54:24 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/80001
6 years, 7 months ago (2014-04-28 23:56:03 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 00:18:16 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on chromium_presubmit
6 years, 7 months ago (2014-04-29 00:18:17 UTC) #32
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 7 months ago (2014-04-29 00:58:19 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/80001
6 years, 7 months ago (2014-04-29 00:59:31 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 01:42:51 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 7 months ago (2014-04-29 01:42:52 UTC) #36
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 7 months ago (2014-04-29 16:30:17 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/80001
6 years, 7 months ago (2014-04-29 16:30:36 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 16:30:51 UTC) #39
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chrome_content_browser_client.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-04-29 16:30:52 UTC) #40
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 7 months ago (2014-04-29 17:59:59 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/100001
6 years, 7 months ago (2014-04-29 18:01:46 UTC) #42
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 23:16:38 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium
6 years, 7 months ago (2014-04-29 23:16:39 UTC) #44
Fady Samuel
The CQ bit was checked by fsamuel@chromium.org
6 years, 7 months ago (2014-04-30 00:37:39 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/237533008/100001
6 years, 7 months ago (2014-04-30 00:40:16 UTC) #46
commit-bot: I haz the power
6 years, 7 months ago (2014-04-30 05:10:38 UTC) #47
Message was sent while issue was closed.
Change committed as 267079

Powered by Google App Engine
This is Rietveld 408576698