#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
+#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_type.h"
#include "ui/events/latency_info.h"
is_showing_(!render_widget_host_->is_hidden()),
size_(native_window->GetSize()),
painting_(true),
-#if !defined(OS_MACOSX)
- delegated_frame_host_(new content::DelegatedFrameHost(this)),
-#endif
weak_ptr_factory_(this) {
DCHECK(render_widget_host_);
render_widget_host_->SetView(this);
#if !defined(OS_MACOSX)
+ content::ImageTransportFactory* factory =
+ content::ImageTransportFactory::GetInstance();
+ delegated_frame_host_ = base::MakeUnique<content::DelegatedFrameHost>(
+ factory->GetContextFactory()->AllocateFrameSinkId(), this);
+
root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR));
#endif
resources));
}
-void OffScreenRenderWidgetHostView::
- DelegatedFrameHostOnLostCompositorResources() {
- render_widget_host_->ScheduleComposite();
-}
-
-void OffScreenRenderWidgetHostView::DelegatedFrameHostUpdateVSyncParameters(
- const base::TimeTicks& timebase, const base::TimeDelta& interval) {
- render_widget_host_->UpdateVSyncParameters(timebase, interval);
-}
-
void OffScreenRenderWidgetHostView::SetBeginFrameSource(
cc::BeginFrameSource* source) {
}
bool defer_compositor_lock) override;
void DelegatedFrameHostResizeLockWasReleased(void) override;
void DelegatedFrameHostSendReclaimCompositorResources(
- int output_surface_id,
- bool is_swap_ack,
- const cc::ReturnedResourceArray& resources) override;
- void DelegatedFrameHostOnLostCompositorResources(void) override;
- void DelegatedFrameHostUpdateVSyncParameters(
- const base::TimeTicks &, const base::TimeDelta &) override;
+ int output_surface_id,
+ bool is_swap_ack,
+ const cc::ReturnedResourceArray& resources) override;
void SetBeginFrameSource(cc::BeginFrameSource* source) override;
#endif // !defined(OS_MACOSX)
#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
#include "ui/views/widget/widget.h"
-#include "ui/wm/public/drag_drop_client.h"
+#include "ui/aura/client/drag_drop_client.h"
namespace atom {
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/win/registry.h"
#include "third_party/wtl/include/atlapp.h"
#include "third_party/wtl/include/atldlgs.h"
struct RunState {
base::Thread* dialog_thread;
- base::MessageLoop* ui_message_loop;
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner;
};
bool CreateDialogThread(RunState* run_state) {
return false;
run_state->dialog_thread = thread.release();
- run_state->ui_message_loop = base::MessageLoop::current();
+ run_state->ui_task_runner = base::ThreadTaskRunnerHandle::Get();
return true;
}
std::vector<base::FilePath> paths;
bool result = ShowOpenDialog(parent, title, button_label, default_path,
filters, properties, &paths);
- run_state.ui_message_loop->PostTask(FROM_HERE,
+ run_state.ui_task_runner->PostTask(FROM_HERE,
base::Bind(callback, result, paths));
- run_state.ui_message_loop->DeleteSoon(FROM_HERE, run_state.dialog_thread);
+ run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread);
}
void RunSaveDialogInNewThread(const RunState& run_state,
base::FilePath path;
bool result = ShowSaveDialog(parent, title, button_label, default_path,
filters, &path);
- run_state.ui_message_loop->PostTask(FROM_HERE,
- base::Bind(callback, result, path));
- run_state.ui_message_loop->DeleteSoon(FROM_HERE, run_state.dialog_thread);
+ run_state.ui_task_runner->PostTask(FROM_HERE,
+ base::Bind(callback, result, path));
+ run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread);
}
} // namespace
return;
}
- run_state.dialog_thread->message_loop()->PostTask(
+ run_state.dialog_thread->task_runner()->PostTask(
FROM_HERE,
base::Bind(&RunOpenDialogInNewThread, run_state, parent, title,
button_label, default_path, filters, properties, callback));
return;
}
- run_state.dialog_thread->message_loop()->PostTask(
+ run_state.dialog_thread->task_runner()->PostTask(
FROM_HERE,
base::Bind(&RunSaveDialogInNewThread, run_state, parent, title,
button_label, default_path, filters, callback));
}
base::Thread* unretained = thread.release();
- unretained->message_loop()->PostTask(
+ unretained->task_runner()->PostTask(
FROM_HERE,
base::Bind(&RunMessageBoxInNewThread, base::Unretained(unretained),
parent, type, buttons, default_id, cancel_id, options, title,
#include "ui/gfx/color_utils.h"
#include "ui/gfx/text_utils.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
+#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_host_view.h"
#include "ui/views/controls/button/label_button_border.h"
std::unique_ptr<views::InkDropRipple> SubmenuButton::CreateInkDropRipple()
const {
- return base::MakeUnique<views::FloodFillInkDropRipple>(
- GetLocalBounds(),
- GetInkDropCenterBasedOnLastEvent(),
- GetInkDropBaseColor(),
- ink_drop_visible_opacity());
+ std::unique_ptr<views::InkDropRipple> ripple(
+ new views::FloodFillInkDropRipple(
+ size(),
+ GetInkDropCenterBasedOnLastEvent(),
+ GetInkDropBaseColor(),
+ ink_drop_visible_opacity()));
+ return ripple;
}
-std::unique_ptr<views::InkDropHighlight>
- SubmenuButton::CreateInkDropHighlight() const {
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
- gfx::Size size = GetLocalBounds().size();
- return base::MakeUnique<views::InkDropHighlight>(
- size,
- kInkDropSmallCornerRadius,
- gfx::RectF(gfx::SizeF(size)).CenterPoint(),
- GetInkDropBaseColor());
-}
-
-bool SubmenuButton::ShouldShowInkDropForFocus() const {
- return false;
+std::unique_ptr<views::InkDrop> SubmenuButton::CreateInkDrop() {
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CustomButton::CreateDefaultInkDropImpl();
+ ink_drop->SetShowHighlightOnHover(false);
+ return std::move(ink_drop);
}
void SubmenuButton::SetAcceleratorVisibility(bool visible) {
// views::InkDropHostView:
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
- std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
- const override;
- bool ShouldShowInkDropForFocus() const override;
+ std::unique_ptr<views::InkDrop> CreateInkDrop() override;
private:
bool GetUnderlinePosition(const base::string16& text,
if (atom_)
UnregisterClass(MAKEINTATOM(atom_), instance_);
- NotifyIcons copied_container(notify_icons_);
- base::STLDeleteContainerPointers(
- copied_container.begin(), copied_container.end());
+ for (NotifyIcon* ptr : notify_icons_)
+ delete ptr;
}
NotifyIcon* NotifyIconHost::CreateNotifyIcon() {
public:
RefCountedTempDir() { ignore_result(temp_dir_.CreateUniqueTempDir()); }
bool IsValid() const { return temp_dir_.IsValid(); }
- const base::FilePath& GetPath() const { return temp_dir_.path(); }
+ const base::FilePath& GetPath() const { return temp_dir_.GetPath(); }
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::FILE>;
// Delay shutdown until the worker terminates. We want this code path
// to wait on the thread to quit before continuing.
if (worker_->IsRunning()) {
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
base::Bind(&PrintJob::ControlledWorkerShutdown, this),
base::TimeDelta::FromMilliseconds(100));
HWND owning_hwnd = views::HWNDForNativeWindow(owning_window);
ExecuteOpenParams execute_params(initial_color, BeginRun(owning_hwnd),
owning_hwnd);
- execute_params.run_state.dialog_thread->message_loop()->PostTask(FROM_HERE,
+ execute_params.run_state.dialog_thread->task_runner()->PostTask(FROM_HERE,
base::Bind(&ColorChooserDialog::ExecuteOpen, this, execute_params));
}
// original coordinates and we'll be able to print in full resolution.
// Before playback we'll need to counter the scaling up that will happen
// in the service (print_system_win.cc).
- *scale_factor =
- gfx::CalculatePageScale(metafile.context(),
- pdf_rendering_settings_.area().right(),
- pdf_rendering_settings_.area().bottom());
+ *scale_factor = gfx::CalculatePageScale(
+ metafile.context(), pdf_rendering_settings_.area.right(),
+ pdf_rendering_settings_.area.bottom());
gfx::ScaleDC(metafile.context(), *scale_factor);
// The underlying metafile is of type Emf and ignores the arguments passed
// to StartPage.
metafile.StartPage(gfx::Size(), gfx::Rect(), 1);
if (!chrome_pdf::RenderPDFPageToDC(
- &pdf_data_.front(),
- pdf_data_.size(),
- page_number,
- metafile.context(),
- pdf_rendering_settings_.dpi(),
- pdf_rendering_settings_.area().x(),
- pdf_rendering_settings_.area().y(),
- pdf_rendering_settings_.area().width(),
- pdf_rendering_settings_.area().height(),
- true,
- false,
- true,
- true,
- pdf_rendering_settings_.autorotate())) {
+ &pdf_data_.front(), pdf_data_.size(), page_number, metafile.context(),
+ pdf_rendering_settings_.dpi, pdf_rendering_settings_.area.x(),
+ pdf_rendering_settings_.area.y(),
+ pdf_rendering_settings_.area.width(),
+ pdf_rendering_settings_.area.height(), true, false, true, true,
+ pdf_rendering_settings_.autorotate)) {
return false;
}
metafile.FinishPage();
'msvs_disabled_warnings': [
4005, # (node.h) macro redefinition
4091, # (node_extern.h) '__declspec(dllimport)' : ignored on left of 'node::Environment' when no variable is declared
+ 4099, # (pdf_render_settings.h) type name first seen using 'class' now seen using 'struct'
4189, # local variable is initialized but not referenced
4201, # (uv.h) nameless struct/union
4267, # conversion from 'size_t' to 'int', possible loss of data
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \
- '455a133fe14b5e33ac6b4fc7f8844ace1cd0a221'
+ 'b71afafe59998daf0cb275b50140378b8c88b101'
PLATFORM = {
'cygwin': 'win32',
-Subproject commit a400856b41aa0485a4b43ba1714c84fef4bb06f8
+Subproject commit 51b4ff84b282d11d559a425253845f850bf3279b