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

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 2005443002: Implement bluetooth chooser for Chrome Apps on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_chooser_bubble_ui_cocoa
Patch Set: rebase and address comments Created 4 years, 6 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/app_window/app_window.h" 5 #include "extensions/browser/app_window/app_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback_helpers.h" 14 #include "base/callback_helpers.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/memory/ptr_util.h"
16 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
18 #include "base/task_runner.h" 19 #include "base/task_runner.h"
19 #include "base/threading/thread_task_runner_handle.h" 20 #include "base/threading/thread_task_runner_handle.h"
20 #include "base/values.h" 21 #include "base/values.h"
21 #include "build/build_config.h" 22 #include "build/build_config.h"
22 #include "components/web_modal/web_contents_modal_dialog_manager.h" 23 #include "components/web_modal/web_contents_modal_dialog_manager.h"
23 #include "content/public/browser/browser_context.h" 24 #include "content/public/browser/browser_context.h"
24 #include "content/public/browser/invalidate_type.h" 25 #include "content/public/browser/invalidate_type.h"
25 #include "content/public/browser/navigation_entry.h" 26 #include "content/public/browser/navigation_entry.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 bool last_unlocked_by_target) { 437 bool last_unlocked_by_target) {
437 DCHECK_EQ(AppWindow::web_contents(), web_contents); 438 DCHECK_EQ(AppWindow::web_contents(), web_contents);
438 helper_->RequestToLockMouse(); 439 helper_->RequestToLockMouse();
439 } 440 }
440 441
441 bool AppWindow::PreHandleGestureEvent(WebContents* source, 442 bool AppWindow::PreHandleGestureEvent(WebContents* source,
442 const blink::WebGestureEvent& event) { 443 const blink::WebGestureEvent& event) {
443 return AppWebContentsHelper::ShouldSuppressGestureEvent(event); 444 return AppWebContentsHelper::ShouldSuppressGestureEvent(event);
444 } 445 }
445 446
447 std::unique_ptr<content::BluetoothChooser> AppWindow::RunBluetoothChooser(
448 content::RenderFrameHost* frame,
449 const content::BluetoothChooser::EventHandler& event_handler) {
450 return ExtensionsBrowserClient::Get()->CreateBluetoothChooser(frame,
451 event_handler);
452 }
453
446 void AppWindow::RenderViewCreated(content::RenderViewHost* render_view_host) { 454 void AppWindow::RenderViewCreated(content::RenderViewHost* render_view_host) {
447 app_delegate_->RenderViewCreated(render_view_host); 455 app_delegate_->RenderViewCreated(render_view_host);
448 } 456 }
449 457
450 void AppWindow::DidFirstVisuallyNonEmptyPaint() { 458 void AppWindow::DidFirstVisuallyNonEmptyPaint() {
451 first_paint_complete_ = true; 459 first_paint_complete_ = true;
452 if (show_on_first_paint_) { 460 if (show_on_first_paint_) {
453 DCHECK(delayed_show_type_ == SHOW_ACTIVE || 461 DCHECK(delayed_show_type_ == SHOW_ACTIVE ||
454 delayed_show_type_ == SHOW_INACTIVE); 462 delayed_show_type_ == SHOW_INACTIVE);
455 Show(delayed_show_type_); 463 Show(delayed_show_type_);
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 region.bounds.x(), 1125 region.bounds.x(),
1118 region.bounds.y(), 1126 region.bounds.y(),
1119 region.bounds.right(), 1127 region.bounds.right(),
1120 region.bounds.bottom(), 1128 region.bounds.bottom(),
1121 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1129 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1122 } 1130 }
1123 return sk_region; 1131 return sk_region;
1124 } 1132 }
1125 1133
1126 } // namespace extensions 1134 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698