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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 13150004: Support color chooser inside extesions, apps, chrome frame, dev tool (Closed) Base URL: http://git.chromium.org/chromium/src.git@ngcolor
Patch Set: Removed chrome/browser/ui/color_chooser.cc Created 7 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/app_window_contents.h" 9 #include "chrome/browser/extensions/app_window_contents.h"
10 #include "chrome/browser/extensions/extension_process_manager.h" 10 #include "chrome/browser/extensions/extension_process_manager.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/browser/ui/browser_finder.h" 23 #include "chrome/browser/ui/browser_finder.h"
24 #include "chrome/browser/ui/browser_tabstrip.h" 24 #include "chrome/browser/ui/browser_tabstrip.h"
25 #include "chrome/browser/ui/browser_window.h" 25 #include "chrome/browser/ui/browser_window.h"
26 #include "chrome/browser/ui/extensions/native_app_window.h" 26 #include "chrome/browser/ui/extensions/native_app_window.h"
27 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" 27 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/extensions/extension.h" 29 #include "chrome/common/extensions/extension.h"
30 #include "chrome/common/extensions/extension_constants.h" 30 #include "chrome/common/extensions/extension_constants.h"
31 #include "chrome/common/extensions/extension_messages.h" 31 #include "chrome/common/extensions/extension_messages.h"
32 #include "chrome/common/extensions/manifest_handlers/icons_handler.h" 32 #include "chrome/common/extensions/manifest_handlers/icons_handler.h"
33 #include "content/public/browser/color_chooser.h"
33 #include "content/public/browser/invalidate_type.h" 34 #include "content/public/browser/invalidate_type.h"
34 #include "content/public/browser/navigation_entry.h" 35 #include "content/public/browser/navigation_entry.h"
35 #include "content/public/browser/notification_details.h" 36 #include "content/public/browser/notification_details.h"
36 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
37 #include "content/public/browser/notification_source.h" 38 #include "content/public/browser/notification_source.h"
38 #include "content/public/browser/notification_types.h" 39 #include "content/public/browser/notification_types.h"
39 #include "content/public/browser/render_view_host.h" 40 #include "content/public/browser/render_view_host.h"
40 #include "content/public/browser/resource_dispatcher_host.h" 41 #include "content/public/browser/resource_dispatcher_host.h"
41 #include "content/public/browser/web_contents.h" 42 #include "content/public/browser/web_contents.h"
42 #include "content/public/common/media_stream_request.h" 43 #include "content/public/common/media_stream_request.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 459 }
459 460
460 void ShellWindow::CloseContents(WebContents* contents) { 461 void ShellWindow::CloseContents(WebContents* contents) {
461 native_app_window_->Close(); 462 native_app_window_->Close();
462 } 463 }
463 464
464 bool ShellWindow::ShouldSuppressDialogs() { 465 bool ShellWindow::ShouldSuppressDialogs() {
465 return true; 466 return true;
466 } 467 }
467 468
469 content::ColorChooser* ShellWindow::OpenColorChooser(WebContents* web_contents,
470 SkColor initial_color) {
471 return content::ColorChooser::Open(web_contents, initial_color);
472 }
473
468 void ShellWindow::RunFileChooser(WebContents* tab, 474 void ShellWindow::RunFileChooser(WebContents* tab,
469 const content::FileChooserParams& params) { 475 const content::FileChooserParams& params) {
470 FileSelectHelper::RunFileChooser(tab, params); 476 FileSelectHelper::RunFileChooser(tab, params);
471 } 477 }
472 478
473 bool ShellWindow::IsPopupOrPanel(const WebContents* source) const { 479 bool ShellWindow::IsPopupOrPanel(const WebContents* source) const {
474 return true; 480 return true;
475 } 481 }
476 482
477 void ShellWindow::MoveContents(WebContents* source, const gfx::Rect& pos) { 483 void ShellWindow::MoveContents(WebContents* source, const gfx::Rect& pos) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 const extensions::DraggableRegion& region = *iter; 588 const extensions::DraggableRegion& region = *iter;
583 sk_region->op( 589 sk_region->op(
584 region.bounds.x(), 590 region.bounds.x(),
585 region.bounds.y(), 591 region.bounds.y(),
586 region.bounds.right(), 592 region.bounds.right(),
587 region.bounds.bottom(), 593 region.bounds.bottom(),
588 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 594 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
589 } 595 }
590 return sk_region; 596 return sk_region;
591 } 597 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698