| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(content::JavaScriptDialogDelegate* delegate, |
| 252 TitleType title_type, | 252 TitleType title_type, |
| 253 const string16& title, | 253 const string16& title, |
| 254 int dialog_flags, | 254 ui::MessageBoxType message_box_type, |
| 255 const string16& message_text, | 255 const string16& message_text, |
| 256 const string16& default_prompt_text, | 256 const string16& default_prompt_text, |
| 257 IPC::Message* reply_message, | 257 IPC::Message* reply_message, |
| 258 bool* did_suppress_message) OVERRIDE { | 258 bool* did_suppress_message) OVERRIDE { |
| 259 *did_suppress_message = true; | 259 *did_suppress_message = true; |
| 260 } | 260 } |
| 261 | 261 |
| 262 virtual void RunBeforeUnloadDialog( | 262 virtual void RunBeforeUnloadDialog( |
| 263 content::JavaScriptDialogDelegate* delegate, | 263 content::JavaScriptDialogDelegate* delegate, |
| 264 const string16& message_text, | 264 const string16& message_text, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 attached_contents_.insert(tab_contents); | 356 attached_contents_.insert(tab_contents); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void TabContentsDelegate::Detach(TabContents* tab_contents) { | 359 void TabContentsDelegate::Detach(TabContents* tab_contents) { |
| 360 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); | 360 DCHECK(attached_contents_.find(tab_contents) != attached_contents_.end()); |
| 361 attached_contents_.erase(tab_contents); | 361 attached_contents_.erase(tab_contents); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void TabContentsDelegate::LostMouseLock() { | 364 void TabContentsDelegate::LostMouseLock() { |
| 365 } | 365 } |
| OLD | NEW |