OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/browser/tab_contents/tab_contents_delegate.h" | 5 #include "content/browser/tab_contents/tab_contents_delegate.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "content/browser/javascript_dialogs.h" | 10 #include "content/browser/javascript_dialogs.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void TabContentsDelegate::DidNavigateToPendingEntry(TabContents* tab) { | 241 void TabContentsDelegate::DidNavigateToPendingEntry(TabContents* tab) { |
242 } | 242 } |
243 | 243 |
244 // A stubbed-out version of JavaScriptDialogCreator that doesn't do anything. | 244 // A stubbed-out version of JavaScriptDialogCreator that doesn't do anything. |
245 class JavaScriptDialogCreatorStub : public content::JavaScriptDialogCreator { | 245 class JavaScriptDialogCreatorStub : public content::JavaScriptDialogCreator { |
246 public: | 246 public: |
247 static JavaScriptDialogCreatorStub* GetInstance() { | 247 static JavaScriptDialogCreatorStub* GetInstance() { |
248 return Singleton<JavaScriptDialogCreatorStub>::get(); | 248 return Singleton<JavaScriptDialogCreatorStub>::get(); |
249 } | 249 } |
250 | 250 |
251 virtual void RunJavaScriptDialog(content::JavaScriptDialogDelegate* delegate, | 251 virtual void RunJavaScriptDialog( |
252 TitleType title_type, | 252 content::JavaScriptDialogDelegate* delegate, |
253 const string16& title, | 253 TitleType title_type, |
254 int dialog_flags, | 254 const string16& title, |
255 const string16& message_text, | 255 ui::JavascriptMessageType javascript_message_type, |
256 const string16& default_prompt_text, | 256 const string16& message_text, |
257 IPC::Message* reply_message, | 257 const string16& default_prompt_text, |
258 bool* did_suppress_message) OVERRIDE { | 258 IPC::Message* reply_message, |
| 259 bool* did_suppress_message) OVERRIDE { |
259 *did_suppress_message = true; | 260 *did_suppress_message = true; |
260 } | 261 } |
261 | 262 |
262 virtual void RunBeforeUnloadDialog( | 263 virtual void RunBeforeUnloadDialog( |
263 content::JavaScriptDialogDelegate* delegate, | 264 content::JavaScriptDialogDelegate* delegate, |
264 const string16& message_text, | 265 const string16& message_text, |
265 IPC::Message* reply_message) OVERRIDE { | 266 IPC::Message* reply_message) OVERRIDE { |
266 delegate->OnDialogClosed(reply_message, true, string16()); | 267 delegate->OnDialogClosed(reply_message, true, string16()); |
267 } | 268 } |
268 | 269 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 attached_contents_.insert(tab_contents); | 357 attached_contents_.insert(tab_contents); |
357 } | 358 } |
358 | 359 |
359 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 360 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
360 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 361 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
361 attached_contents_.erase(tab_contents); | 362 attached_contents_.erase(tab_contents); |
362 } | 363 } |
363 | 364 |
364 void TabContentsDelegate::LostMouseLock() { | 365 void TabContentsDelegate::LostMouseLock() { |
365 } | 366 } |
OLD | NEW |