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

Issue 441011: Created HtmlDialogTabContentsDelegate, which encapsulates the (Closed)

Created:
11 years, 1 month ago by akalin
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Created HtmlDialogTabContentsDelegate, which encapsulates the TabContentsDelegate behavior for HTML dialogs. Made all three implementations (gtk, win32, and cocoa) use it. This also makes HTML dialogs not tied to a Browser instance. Also, unlike the current behavior, any links followed from an HTML dialog box will be opened in a non-incognito browser, even if the HTML dialog was launched from an incognito browser. According to beng, this is okay. BUG=28609 TEST=unittests, manual testing on linux/windows/os x with sync setup wizard Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33752

Patch Set 1 #

Patch Set 2 : Fixed lint errors. #

Patch Set 3 : Fixed whitespace, tweaked some behavior. #

Patch Set 4 : Fixed comment. #

Patch Set 5 : Added tests. #

Patch Set 6 : Fixed whitespace. #

Total comments: 4

Patch Set 7 : Addressed tim's and zork's comments #

Patch Set 8 : Synced to head. #

Patch Set 9 : Fixed Windows compile error #

Total comments: 1

Patch Set 10 : Addressed tim's and shess's comments. #

Patch Set 11 : Synced to head. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -303 lines) Patch
M chrome/browser/cocoa/html_dialog_window_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/cocoa/html_dialog_window_controller.mm View 1 2 3 4 5 6 8 chunks +14 lines, -109 lines 0 comments Download
A chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +66 lines, -0 lines 0 comments Download
A chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc View 1 2 3 4 5 6 1 chunk +107 lines, -0 lines 0 comments Download
A chrome/browser/dom_ui/html_dialog_tab_contents_delegate_unittest.cc View 5 6 1 chunk +158 lines, -0 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/gtk/html_dialog_gtk.h View 2 chunks +11 lines, -29 lines 0 comments Download
M chrome/browser/gtk/html_dialog_gtk.cc View 1 2 3 4 5 6 5 chunks +14 lines, -68 lines 0 comments Download
M chrome/browser/views/html_dialog_view.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -29 lines 0 comments Download
M chrome/browser/views/html_dialog_view.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -66 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
akalin
+tim for views/ changes, + zork for gtk changes, +shess for cocoa changes and everything ...
11 years ago (2009-12-02 02:08:00 UTC) #1
tim (not reviewing)
I'm still looking, but wanted to say thanks for doing this! http://codereview.chromium.org/441011/diff/8007/8011 File chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h (right): ...
11 years ago (2009-12-02 05:31:06 UTC) #2
akalin (wrong akalin)
On Tue, Dec 1, 2009 at 9:31 PM, <tim@chromium.org> wrote: > http://codereview.chromium.org/441011/diff/8007/8011#newcode62 > chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h:62: Profile* ...
11 years ago (2009-12-02 09:29:28 UTC) #3
Zachary Kuznia
LGTM on the gtk changes. http://codereview.chromium.org/441011/diff/8007/8010 File chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc (right): http://codereview.chromium.org/441011/diff/8007/8010#newcode1 chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc:1: // Copyright (c) 2006-2008 ...
11 years ago (2009-12-02 20:00:23 UTC) #4
akalin
On 2009/12/02 05:31:06, timsteele wrote: > I'm still looking, but wanted to say thanks for ...
11 years ago (2009-12-02 22:25:01 UTC) #5
tim (not reviewing)
views and dom_ui LGTM http://codereview.chromium.org/441011/diff/12006/14019 File chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h (right): http://codereview.chromium.org/441011/diff/12006/14019#newcode62 chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h:62: Profile* profile_; // weak, always ...
11 years ago (2009-12-03 02:57:31 UTC) #6
Scott Hess - ex-Googler
LGTM, except that that I think you're breaking the multiple-inheritance style guidelines in HtmlDialogView (and ...
11 years ago (2009-12-03 19:17:04 UTC) #7
akalin (wrong akalin)
11 years ago (2009-12-03 23:18:23 UTC) #8
On Wed, Dec 2, 2009 at 6:57 PM,  <tim@chromium.org> wrote:
> views and dom_ui LGTM
>
> http://codereview.chromium.org/441011/diff/12006/14019#newcode62
> chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h:62: Profile*
> profile_;  // weak, always an original profile
> Still not sure what 'weak' is about, but it should be capital and a
> period at the end either way :)

'weak' as in 'weak pointer/reference'.  Capitalized and added period.

On Thu, Dec 3, 2009 at 11:17 AM,  <shess@chromium.org> wrote:
> LGTM, except that that I think you're breaking the multiple-inheritance
> style
> guidelines in HtmlDialogView (and possibly others).  I don't claim enough
> C++ Fu
> to make any sort of ruling or suggestion on this.

Oh, you're right.  That's easy enough to fix (just make HtmlDialogView
contain a HtmlDialogTabContentsDelegate instance instead of
inheriting, which is really what it should do anyway), but I'd prefer
to do it in a follow-up CL.  Added TODO.

Submitting soon!

-- 
Frederick Akalin
Software Engineer

Powered by Google App Engine
This is Rietveld 408576698