Revert unnecessary changes

This commit is contained in:
Cheng Zhao 2016-08-03 10:48:07 +09:00
parent aefd99ec7f
commit b0e36ec93a
5 changed files with 5 additions and 32 deletions

View file

@ -9,11 +9,6 @@
#include "atom/common/node_includes.h" #include "atom/common/node_includes.h"
#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "cc/surfaces/surface_manager.h"
#include "cc/surfaces/surface.h"
#include "cc/output/copy_output_request.h"
namespace atom { namespace atom {
namespace api { namespace api {
@ -35,7 +30,6 @@ bool FrameSubscriber::ShouldCaptureFrame(
scoped_refptr<media::VideoFrame>* storage, scoped_refptr<media::VideoFrame>* storage,
DeliverFrameCallback* callback) { DeliverFrameCallback* callback) {
const auto host = view_ ? view_->GetRenderWidgetHost() : nullptr; const auto host = view_ ? view_->GetRenderWidgetHost() : nullptr;
if (!view_ || !host) if (!view_ || !host)
return false; return false;

View file

@ -14,10 +14,6 @@
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
#include "v8/include/v8.h" #include "v8/include/v8.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "cc/surfaces/surface_id.h"
#include "cc/output/copy_output_result.h"
namespace atom { namespace atom {
namespace api { namespace api {
@ -38,9 +34,6 @@ class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber {
DeliverFrameCallback* callback) override; DeliverFrameCallback* callback) override;
private: private:
void ReadbackResultAsBitmap(
std::unique_ptr<cc::CopyOutputResult> result);
void OnFrameDelivered(const FrameCaptureCallback& callback, void OnFrameDelivered(const FrameCaptureCallback& callback,
const gfx::Rect& damage_rect, const gfx::Rect& damage_rect,
const SkBitmap& bitmap, const SkBitmap& bitmap,

View file

@ -8,8 +8,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <iostream>
#include "atom/browser/atom_browser_context.h" #include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_javascript_dialog_manager.h" #include "atom/browser/atom_javascript_dialog_manager.h"
#include "atom/browser/atom_security_state_model_client.h" #include "atom/browser/atom_security_state_model_client.h"
@ -33,10 +31,6 @@
#include "content/public/browser/security_style_explanations.h" #include "content/public/browser/security_style_explanations.h"
#include "storage/browser/fileapi/isolated_context.h" #include "storage/browser/fileapi/isolated_context.h"
// #include "content/browser/web_contents/web_contents_impl.h"
// #include "atom/browser/osr_web_contents_view.h"
#include "atom/browser/native_window_views.h"
using content::BrowserThread; using content::BrowserThread;
using security_state::SecurityStateModel; using security_state::SecurityStateModel;
@ -200,7 +194,6 @@ void CommonWebContentsDelegate::SetOwnerWindow(NativeWindow* owner_window) {
void CommonWebContentsDelegate::SetOwnerWindow( void CommonWebContentsDelegate::SetOwnerWindow(
content::WebContents* web_contents, NativeWindow* owner_window) { content::WebContents* web_contents, NativeWindow* owner_window) {
owner_window_ = owner_window->GetWeakPtr(); owner_window_ = owner_window->GetWeakPtr();
NativeWindowRelay* relay = new NativeWindowRelay(owner_window_); NativeWindowRelay* relay = new NativeWindowRelay(owner_window_);
web_contents->SetUserData(relay->key, relay); web_contents->SetUserData(relay->key, relay);
} }

View file

@ -57,13 +57,6 @@
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif #endif
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/context_factory.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "ui/gfx/native_widget_types.h"
namespace atom { namespace atom {
namespace { namespace {
@ -1237,13 +1230,13 @@ void NativeWindowViews::HandleKeyboardEvent(
} }
} }
/*gfx::Size NativeWindowViews::GetMinimumSize() { gfx::Size NativeWindowViews::GetMinimumSize() {
return NativeWindow::GetMinimumSize(); return NativeWindow::GetMinimumSize();
} }
gfx::Size NativeWindowViews::GetMaximumSize() { gfx::Size NativeWindowViews::GetMaximumSize() {
return NativeWindow::GetMaximumSize(); return NativeWindow::GetMaximumSize();
}*/ }
bool NativeWindowViews::AcceleratorPressed(const ui::Accelerator& accelerator) { bool NativeWindowViews::AcceleratorPressed(const ui::Accelerator& accelerator) {
return accelerator_util::TriggerAcceleratorTableCommand( return accelerator_util::TriggerAcceleratorTableCommand(

View file

@ -170,9 +170,9 @@ class NativeWindowViews : public NativeWindow,
content::WebContents*, content::WebContents*,
const content::NativeWebKeyboardEvent& event) override; const content::NativeWebKeyboardEvent& event) override;
// // views::View: // views::View:
// gfx::Size GetMinimumSize() const override; gfx::Size GetMinimumSize() const override;
// gfx::Size GetMaximumSize() const override; gfx::Size GetMaximumSize() const override;
bool AcceleratorPressed(const ui::Accelerator& accelerator) override; bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
// Register accelerators supported by the menu model. // Register accelerators supported by the menu model.