diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 22:30:24 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-14 22:30:24 +0000 |
commit | a7918784c2ac95844ae775be2fef06cd3efb092c (patch) | |
tree | edc68878aa7929bae7b432cea8c488729b177de2 /chrome/browser/extensions/extension_tabs_module.cc | |
parent | 5624320887eb78e1d74268fdf0049ee7b58015d9 (diff) | |
download | chromium_src-a7918784c2ac95844ae775be2fef06cd3efb092c.zip chromium_src-a7918784c2ac95844ae775be2fef06cd3efb092c.tar.gz chromium_src-a7918784c2ac95844ae775be2fef06cd3efb092c.tar.bz2 |
Implement chrome.tabs.getVisibleTabCapture() on Mac
Review URL: http://codereview.chromium.org/165429
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_tabs_module.cc')
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 12b3547..4b3c9f3 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -640,7 +640,6 @@ bool CaptureVisibleTabFunction::RunImpl() { } SkBitmap screen_capture; -#if defined(OS_WIN) TabContents* tab_contents = browser->GetSelectedTabContents(); if (!tab_contents) { error_ = keys::kInternalVisibleTabCaptureError; @@ -652,6 +651,7 @@ bool CaptureVisibleTabFunction::RunImpl() { error_ = keys::kInternalVisibleTabCaptureError; return false; } +#if defined(OS_WIN) skia::PlatformCanvas temp_canvas; if (!temp_canvas.initialize(backing_store->size().width(), backing_store->size().height(), true)) { @@ -666,6 +666,9 @@ bool CaptureVisibleTabFunction::RunImpl() { temp_canvas.endPlatformPaint(); screen_capture = temp_canvas.getTopPlatformDevice().accessBitmap(false); +#elif defined(OS_MACOSX) + screen_capture = backing_store->canvas()->getTopPlatformDevice() + .accessBitmap(false); #else // TODO(port) error_ = keys::kNotImplementedError; |