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

Side by Side Diff: chrome/browser/chrome_plugin_host.cc

Issue 4110010: Cloud Print Dialog work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Direct paths for prefs. Created 10 years, 1 month 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
« no previous file with comments | « chrome/browser/browser_signin.cc ('k') | chrome/browser/chromeos/frame/bubble_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/chrome_plugin_host.h" 5 #include "chrome/browser/chrome_plugin_host.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 virtual void GetDialogSize(gfx::Size* size) const { 320 virtual void GetDialogSize(gfx::Size* size) const {
321 size->set_width(params_.width); 321 size->set_width(params_.width);
322 size->set_height(params_.height); 322 size->set_height(params_.height);
323 } 323 }
324 virtual std::string GetDialogArgs() const { return params_.json_input; } 324 virtual std::string GetDialogArgs() const { return params_.json_input; }
325 virtual void OnDialogClosed(const std::string& json_retval) { 325 virtual void OnDialogClosed(const std::string& json_retval) {
326 io_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( 326 io_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
327 this, &ModelessHtmlDialogDelegate::ReportResults, json_retval)); 327 this, &ModelessHtmlDialogDelegate::ReportResults, json_retval));
328 } 328 }
329 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } 329 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { }
330 virtual bool ShouldShowDialogTitle() const { return true; }
330 331
331 private: 332 private:
332 // Actually shows the dialog on the UI thread. 333 // Actually shows the dialog on the UI thread.
333 void Show() { 334 void Show() {
334 DCHECK(MessageLoop::current() == main_message_loop_); 335 DCHECK(MessageLoop::current() == main_message_loop_);
335 Browser* browser = BrowserList::GetLastActive(); 336 Browser* browser = BrowserList::GetLastActive();
336 browser->BrowserShowHtmlDialog(this, parent_wnd_); 337 browser->BrowserShowHtmlDialog(this, parent_wnd_);
337 } 338 }
338 339
339 // Gives the JSON result string back to the plugin. 340 // Gives the JSON result string back to the plugin.
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 CPBrowsingContext context) { 824 CPBrowsingContext context) {
824 // Sadly if we try and pass context through, we seem to break cl's little 825 // Sadly if we try and pass context through, we seem to break cl's little
825 // brain trying to compile the Tuple3 ctor. This cast works. 826 // brain trying to compile the Tuple3 ctor. This cast works.
826 int32 context_as_int32 = static_cast<int32>(context); 827 int32 context_as_int32 = static_cast<int32>(context);
827 // Plugins can only be accessed on the IO thread. 828 // Plugins can only be accessed on the IO thread.
828 BrowserThread::PostTask( 829 BrowserThread::PostTask(
829 BrowserThread::IO, FROM_HERE, 830 BrowserThread::IO, FROM_HERE,
830 NewRunnableFunction(PluginCommandHandler::HandleCommand, 831 NewRunnableFunction(PluginCommandHandler::HandleCommand,
831 command, data, context_as_int32)); 832 command, data, context_as_int32));
832 } 833 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_signin.cc ('k') | chrome/browser/chromeos/frame/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698