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

Side by Side Diff: chrome/browser/ui/tab_modal_confirm_dialog_delegate.h

Issue 17500003: Close web contents modal dialogs on content load start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for autocheckout dialog breakage Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // the buttons have no stock icons. 79 // the buttons have no stock icons.
80 virtual const char* GetAcceptButtonIcon(); 80 virtual const char* GetAcceptButtonIcon();
81 virtual const char* GetCancelButtonIcon(); 81 virtual const char* GetCancelButtonIcon();
82 82
83 protected: 83 protected:
84 TabModalConfirmDialogCloseDelegate* close_delegate() { 84 TabModalConfirmDialogCloseDelegate* close_delegate() {
85 return close_delegate_; 85 return close_delegate_;
86 } 86 }
87 87
88 // content::NotificationObserver implementation. 88 // content::NotificationObserver implementation.
89 // Watch for a new load or a closed tab and dismiss the dialog if they occur. 89 // Watch for a closed tab and dismiss the dialog if it occurs.
90 virtual void Observe(int type, 90 virtual void Observe(int type,
91 const content::NotificationSource& source, 91 const content::NotificationSource& source,
92 const content::NotificationDetails& details) OVERRIDE; 92 const content::NotificationDetails& details) OVERRIDE;
93 93
94 content::NotificationRegistrar registrar_; 94 content::NotificationRegistrar registrar_;
95 95
96 private: 96 private:
97 // It is guaranteed that exactly one of |OnAccepted|, |OnCanceled| or 97 // It is guaranteed that exactly one of |OnAccepted|, |OnCanceled| or
98 // |OnLinkClicked| is eventually called. These method are private to 98 // |OnLinkClicked| is eventually called. These method are private to
99 // enforce this guarantee. Access to them is controlled by |Accept|, 99 // enforce this guarantee. Access to them is controlled by |Accept|,
(...skipping 11 matching lines...) Expand all
111 111
112 TabModalConfirmDialogCloseDelegate* close_delegate_; 112 TabModalConfirmDialogCloseDelegate* close_delegate_;
113 // True iff we are in the process of closing, to avoid running callbacks 113 // True iff we are in the process of closing, to avoid running callbacks
114 // multiple times. 114 // multiple times.
115 bool closing_; 115 bool closing_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogDelegate); 117 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogDelegate);
118 }; 118 };
119 119
120 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_ 120 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698