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

Side by Side Diff: content/public/browser/web_contents_delegate.h

Issue 9203001: Implement input type=color UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed issues/removed color_select_helper/added color_chooser_id Created 8 years, 10 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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/browser/navigation_type.h" 15 #include "content/public/browser/navigation_type.h"
16 #include "content/public/common/page_transition_types.h" 16 #include "content/public/common/page_transition_types.h"
17 #include "content/public/common/window_container_type.h" 17 #include "content/public/common/window_container_type.h"
18 #include "third_party/skia/include/core/SkColor.h"
18 #include "ui/gfx/native_widget_types.h" 19 #include "ui/gfx/native_widget_types.h"
19 #include "webkit/glue/window_open_disposition.h" 20 #include "webkit/glue/window_open_disposition.h"
20 21
21 class FilePath; 22 class FilePath;
22 class GURL; 23 class GURL;
23 class TabContents; 24 class TabContents;
24 struct ContextMenuParams; 25 struct ContextMenuParams;
25 struct NativeWebKeyboardEvent; 26 struct NativeWebKeyboardEvent;
26 27
27 namespace base { 28 namespace base {
(...skipping 17 matching lines...) Expand all
45 } 46 }
46 47
47 namespace history { 48 namespace history {
48 class HistoryAddPageArgs; 49 class HistoryAddPageArgs;
49 } 50 }
50 51
51 namespace webkit_glue { 52 namespace webkit_glue {
52 struct WebIntentData; 53 struct WebIntentData;
53 } 54 }
54 55
56 namespace WebKit {
Peter Kasting 2012/02/07 01:46:24 Remove this.
keishi 2012/02/17 11:31:05 Done.
57 typedef unsigned WebColor;
58 }
59
55 namespace content { 60 namespace content {
56 61
57 struct OpenURLParams; 62 struct OpenURLParams;
58 63
59 // Objects implement this interface to get notified about changes in the 64 // Objects implement this interface to get notified about changes in the
60 // WebContents and to provide necessary functionality. 65 // WebContents and to provide necessary functionality.
61 class CONTENT_EXPORT WebContentsDelegate { 66 class CONTENT_EXPORT WebContentsDelegate {
62 public: 67 public:
63 WebContentsDelegate(); 68 WebContentsDelegate();
64 69
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 314
310 // Invoked when navigating to a pending entry. When invoked the 315 // Invoked when navigating to a pending entry. When invoked the
311 // NavigationController has configured its pending entry, but it has not yet 316 // NavigationController has configured its pending entry, but it has not yet
312 // been committed. 317 // been committed.
313 virtual void DidNavigateToPendingEntry(WebContents* tab) {} 318 virtual void DidNavigateToPendingEntry(WebContents* tab) {}
314 319
315 // Returns a pointer to a service to create JavaScript dialogs. May return 320 // Returns a pointer to a service to create JavaScript dialogs. May return
316 // NULL in which case dialogs aren't shown. 321 // NULL in which case dialogs aren't shown.
317 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator(); 322 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator();
318 323
324 // Called when color chooser should open.
325 virtual void OpenColorChooser(WebContents* tab,
326 unsigned color_chooser_id,
Peter Kasting 2012/02/07 01:46:24 Nit: See other nit regarding "unsigned"
keishi 2012/02/17 11:31:05 Done.
327 const SkColor& color) {}
328
329 // Called when color chooser should end.
330 virtual void EndColorChooser(WebContents* tab, unsigned color_chooser_id) {}
331
332 // Called when the selected color in color chooser should change.
333 virtual void SetSelectedColorInColorChooser(WebContents* tab,
334 unsigned color_chooser_id,
335 const SkColor& color) {}
336
337 // Called when the color chooser has ended.
338 virtual void DidEndColorChooser(WebContents* tab) {}
339
319 // Called when a file selection is to be done. 340 // Called when a file selection is to be done.
320 virtual void RunFileChooser(WebContents* tab, 341 virtual void RunFileChooser(WebContents* tab,
321 const FileChooserParams& params) {} 342 const FileChooserParams& params) {}
322 343
323 // Request to enumerate a directory. This is equivalent to running the file 344 // Request to enumerate a directory. This is equivalent to running the file
324 // chooser in directory-enumeration mode and having the user select the given 345 // chooser in directory-enumeration mode and having the user select the given
325 // directory. 346 // directory.
326 virtual void EnumerateDirectory(WebContents* tab, 347 virtual void EnumerateDirectory(WebContents* tab,
327 int request_id, 348 int request_id,
328 const FilePath& path) {} 349 const FilePath& path) {}
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Called when |this| is no longer the WebContentsDelegate for |source|. 418 // Called when |this| is no longer the WebContentsDelegate for |source|.
398 void Detach(WebContents* source); 419 void Detach(WebContents* source);
399 420
400 // The WebContents that this is currently a delegate for. 421 // The WebContents that this is currently a delegate for.
401 std::set<WebContents*> attached_contents_; 422 std::set<WebContents*> attached_contents_;
402 }; 423 };
403 424
404 } // namespace content 425 } // namespace content
405 426
406 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 427 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698